king
2021-06-24 95afd40fc2741ac0ce59c2091f6cfce1f98877d4
src/templates/sharecomponent/searchcomponent/searcheditable/index.jsx
@@ -116,9 +116,8 @@
              <span className="operation-btn" title={props.dict['header.form.up']} onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span>
              <span className="operation-btn" title={props.dict['header.form.down']} onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span>
              <Popconfirm
                title={props.dict['header.form.query.delete']}
                okText={props.dict['model.confirm']}
                cancelText={props.dict['model.cancel']}
                overlayClassName="popover-confirm"
                title={props.dict['model.query.delete']}
                onConfirm={() => this.handleDelete(record.key)
              }>
                <span style={{color: '#1890ff', cursor: 'pointer'}}><Icon type="delete" /></span>
@@ -172,8 +171,9 @@
  }
  handleDelete = key => {
    const dataSource = [...this.state.dataSource]
    this.setState({ dataSource: dataSource.filter(item => item.key !== key) })
    const dataSource = this.state.dataSource.filter(item => item.key !== key)
    this.setState({ dataSource })
    this.props.onChange && this.props.onChange(dataSource)
  }
  handleAdd = () => {
@@ -186,10 +186,12 @@
    if (type === 'link') {
      newData.ParentID = `${count}`
    }
    let data = [...dataSource, newData]
    this.setState({
      dataSource: [...dataSource, newData],
      dataSource: data,
      count: count + 1
    })
    this.props.onChange && this.props.onChange(data)
  }
  handleSave = row => {
@@ -201,6 +203,7 @@
      ...row
    })
    this.setState({ dataSource: newData })
    this.props.onChange && this.props.onChange(newData)
  }
  resetColumn = (type) => {
@@ -227,9 +230,8 @@
              <span className="operation-btn" title={this.props.dict['header.form.up']} onClick={() => this.handleUpDown(record, 'up')} style={{color: '#1890ff'}}><Icon type="arrow-up" /></span>
              <span className="operation-btn" title={this.props.dict['header.form.down']} onClick={() => this.handleUpDown(record, 'down')} style={{color: '#ff4d4f'}}><Icon type="arrow-down" /></span>
              <Popconfirm
                title={this.props.dict['header.form.query.delete']}
                okText={this.props.dict['model.confirm']}
                cancelText={this.props.dict['model.cancel']}
                overlayClassName="popover-confirm"
                title={this.props.dict['model.query.delete']}
                onConfirm={() => this.handleDelete(record.key)
              }>
                <span style={{color: '#1890ff', cursor: 'pointer'}}><Icon type="delete" /></span>