From b223552a0c4bc787ad251add025a93d77527ffbe Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 18 十二月 2021 23:36:28 +0800 Subject: [PATCH] 2021-12-18 --- src/mob/modalconfig/index.jsx | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx index 3c54c06..227d758 100644 --- a/src/mob/modalconfig/index.jsx +++ b/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"> -- Gitblit v1.8.0