| | |
| | | }) |
| | | } |
| | | |
| | | clearConfig = () => { |
| | | const _this = this |
| | | let _config = {...this.state.config, fields: []} |
| | | |
| | | confirm({ |
| | | content: '确定清空表单吗?', |
| | | onOk() { |
| | | _this.setState({ config: _config }) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | |
| | | |
| | | render () { |
| | | const { editAction } = this.props |
| | | const { config, dict, openEdition } = this.state |
| | |
| | | <div className="setting"> |
| | | <Card title="表单配置" bordered={false} extra={ |
| | | <div> |
| | | <Button type="danger" onClick={this.clearConfig}>清空</Button> |
| | | <Versions MenuId={editAction.uuid} open_edition={openEdition} updateConfig={this.refreshConfig}/> |
| | | <ReplaceField type="form" config={config} updateConfig={this.updateconfig}/> |
| | | <EditComponent dict={dict} options={['form']} config={this.state.config} plusFields={this.plusFields}/> |