From 3d4bc79a80eb9cff0f8ef7c53f9685c9ff9fbd2d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 02 九月 2021 23:17:36 +0800 Subject: [PATCH] 2021-09-02 --- src/menu/modalconfig/index.jsx | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/menu/modalconfig/index.jsx b/src/menu/modalconfig/index.jsx index 7aed763..fc2a91e 100644 --- a/src/menu/modalconfig/index.jsx +++ b/src/menu/modalconfig/index.jsx @@ -303,6 +303,19 @@ }, 100) } + clearConfig = () => { + const _this = this + let _config = {...this.state.config, fields: []} + + confirm({ + content: '纭畾娓呯┖琛ㄥ崟鍚楋紵', + onOk() { + _this.setState({ config: _config }) + }, + onCancel() {} + }) + } + completeSave = () => { this.setState({saving: false}) } @@ -434,6 +447,7 @@ <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> -- Gitblit v1.8.0