| | |
| | | }, 100) |
| | | } |
| | | |
| | | clearConfig = () => { |
| | | const _this = this |
| | | let _config = {...this.state.config, fields: []} |
| | | |
| | | confirm({ |
| | | content: '确定清空表单吗?', |
| | | onOk() { |
| | | _this.setState({ config: _config }) |
| | | }, |
| | | onCancel() {} |
| | | }) |
| | | } |
| | | |
| | | completeSave = () => { |
| | | this.setState({saving: false}) |
| | | } |
| | |
| | | <div className="setting"> |
| | | <Card title={dict['header.menu.form.configurable']} bordered={false} extra={ |
| | | <div> |
| | | <Button type="danger" onClick={this.clearConfig}>清空</Button> |
| | | <EditComponent dict={dict} options={['form']} config={this.state.config} refresh={(res) => this.updateConfig(res.config)}/> |
| | | <Button type="primary" loading={saving} onClick={this.submitConfig}>保存</Button> |
| | | <Button onClick={this.cancelConfig}>返回</Button> |