king
2023-03-07 79006d19801eb10e7532eaf8478d1dd2c239954b
src/menu/components/form/simple-form/index.jsx
@@ -506,7 +506,7 @@
    let _config = fromJS(this.state.card).toJS()
    if (res.subButton) {
      let _this = this
      let that = this
      _config.subcards[0].setting.focus = res.focus
      _config.subcards[0].setting.cache = res.cache
@@ -527,12 +527,38 @@
      })
      confirm({
        content: `替换表单及按钮配置?`,
        content: '替换表单及按钮配置?',
        onOk() {
          _this.updateComponent(_config)
          that.updateComponent(_config)
        },
        onCancel() {}
      })
      return
    } else if (res.fields) {
      if (_config.subcards[0].fields.length > 0) {
        let that = this
        _config.subcards[0].fields = res.fields.map(item => {
          item.uuid = Utils.getuuid()
          return item
        })
        confirm({
          title: '确定替换表单吗?',
          content: '原表单将删除。',
          onOk() {
            that.updateComponent(_config)
          },
          onCancel() {}
        })
      } else {
        _config.subcards[0].fields = res.fields.map(item => {
          item.uuid = Utils.getuuid()
          return item
        })
        this.updateComponent(_config)
      }
      return
    }
@@ -636,7 +662,7 @@
              <EditOutlined style={{color: '#1890ff'}} title="编辑"/>
            </NormalForm>
            <CopyComponent type="simpleform" card={card}/>
            <PasteComponent config={card} options={['form', 'formgroup']} updateConfig={this.pasteForm} />
            <PasteComponent config={card} options={['form', 'forms', 'formgroup']} updateConfig={this.pasteForm} />
            <FontColorsOutlined className="style" title="调整样式" onClick={this.changeStyle}/>
            <UserComponent config={card}/>
            <DeleteOutlined className="close" title="删除组件" onClick={() => this.props.deletecomponent(card.uuid)} />