king
2021-09-01 31ec63f0419895876cbaba99637a884a32d33d0d
src/templates/zshare/modalform/modaleditable/index.jsx
@@ -134,7 +134,7 @@
    let fields = []
    let dataItem = data[0] || ''
    if (type === 'select' || type === 'radio') {
    if (type === 'select' || type === 'radio' || type === 'link') {
      fields = linkSubFields.map(cell => {
        return {
          title: cell.label,
@@ -233,7 +233,7 @@
          if (isNaN(val)) {
            val = ''
          }
        } catch {
        } catch (e) {
          val = ''
        }
      } else {
@@ -300,7 +300,8 @@
    })
  }
  handleAdd = () => {
  handleAdd = (e) => {
    e.stopPropagation()
    const { type, count, dataSource } = this.state
    const newData = {
      key: Utils.getuuid(),
@@ -339,7 +340,7 @@
    let fields = []
    if ((type === 'select' || type === 'radio') && linkSubFields.length > this.state.linkSubFields) {
      let addcol = linkSubFields[linkSubFields.length - 1]
      let addcol = linkSubFields.slice(-1)[0]
      dataSource = dataSource.map(data => {
        data[addcol.field] = data.Text
        return data
@@ -348,7 +349,7 @@
    let dataItem = dataSource ? dataSource[0] : ''
    if (type === 'select' || type === 'radio') {
    if (type === 'select' || type === 'radio' || type === 'link') {
      fields = linkSubFields.map(field => {
        return {
          title: field.label,
@@ -388,7 +389,7 @@
                title={this.props.dict['model.query.delete']}
                onConfirm={() => this.handleDelete(record.key)
              }>
                <span style={{color: '#1890ff', cursor: 'pointer'}}><Icon type="delete" /></span>
                <span style={{color: '#ff4d4f', cursor: 'pointer'}}><Icon type="delete" /></span>
              </Popconfirm>
            </div>
          ) : null,