king
2021-12-18 b223552a0c4bc787ad251add025a93d77527ffbe
src/mob/modalconfig/index.jsx
@@ -399,6 +399,19 @@
    })
  }
  clearConfig = () => {
    const _this = this
    let _config = {...this.state.config, fields: []}
    confirm({
      content: '确定清空表单吗?',
      onOk() {
        _this.setState({ config: _config })
      },
      onCancel() {}
    })
  }
  render () {
    const { config, dict, saving } = this.state
@@ -422,6 +435,7 @@
            <Button type="primary" loading={saving} onClick={this.submitConfig}>保存</Button>
            <Button onClick={this.cancelConfig}>返回</Button>
            <PasteComponent config={config} updateConfig={this.insert} />
            <Button type="danger" onClick={this.clearConfig}>清空</Button>
            <Switch checkedChildren={dict['model.switch.open']} unCheckedChildren={dict['model.switch.close']} defaultChecked={this.state.showField} onChange={(val) => this.setState({showField: val})} />
          </div>
          <div className="setting">