king
2020-03-02 ba7c54e0029456e6b1bf7f0e0d31af69a3d74db3
src/templates/formtabconfig/index.jsx
@@ -2111,6 +2111,26 @@
    })
  }
  handleTabGroup = (index, type) => {
    let config = JSON.parse(JSON.stringify(this.state.config))
    if (type === 'up') {
      config.tabgroups.splice(index, 0, config.tabgroups.splice(index - 1, 1)[0])
    } else {
      config.tabgroups.splice(index, 0, config.tabgroups.splice(index + 1, 1)[0])
    }
    this.setState({
      config: config
    })
    notification.success({
      top: 92,
      message: '调整成功',
      duration: 2
    })
  }
  render () {
    const { config, modaltype } = this.state
    let _length = config.groups.length
@@ -2286,6 +2306,10 @@
                    {index === 0 ? <Tooltip placement="bottomLeft" overlayClassName="middle" title="在左侧工具栏《标签页》中,选择对应类型的标签页拖至此处添加。">
                      <Icon type="question-circle" />
                    </Tooltip> : null}
                    {index !== (this.state.config.tabgroups.length - 1) ?
                      <Icon type="arrow-down" onClick={() => {this.handleTabGroup(index, 'down')}} /> : null
                    }
                    {index !== 0 ? <Icon type="arrow-up" onClick={() => {this.handleTabGroup(index, 'up')}} /> : null}
                    {index === 0 ? <Icon type="plus" onClick={this.addTabGroup} /> : null}
                    {index !== 0 ? <Icon type="delete" onClick={() => {this.delTabGroup(groupId)}} /> : null}
                    <TabDragElement