From d9e822b0f72f8e232c7836f366e80bf3be25c4d8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期日, 18 七月 2021 17:54:40 +0800 Subject: [PATCH] 2021-07-18 --- src/menu/popview/index.jsx | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/src/menu/popview/index.jsx b/src/menu/popview/index.jsx index a80ddd5..2cae8b8 100644 --- a/src/menu/popview/index.jsx +++ b/src/menu/popview/index.jsx @@ -21,6 +21,7 @@ const MenuForm = asyncComponent(() => import('./menuform')) const SourceWrap = asyncComponent(() => import('@/menu/modulesource')) const MenuShell = asyncComponent(() => import('@/menu/menushell')) +const ReplaceField = asyncComponent(() => import('@/menu/replaceField')) const BgController = asyncComponent(() => import('@/menu/bgcontroller')) const PasteController = asyncComponent(() => import('@/menu/pastecontroller')) const PaddingController = asyncComponent(() => import('@/menu/padcontroller')) @@ -528,6 +529,18 @@ window.GLOB.customMenu = config } + resetConfig = (config) => { + this.setState({ + config: {...config, components: []}, + }, () => { + this.setState({ + config: config + }) + }) + + window.GLOB.customMenu = config + } + /** * @description 鏇存柊甯哥敤琛ㄤ俊鎭紝蹇嵎娣诲姞鍚庢洿鏂伴厤缃俊鎭� */ @@ -582,6 +595,7 @@ <div> {config && config.MenuName} </div> } bordered={false} extra={ <div> + <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <StyleCombControlButton menu={config} /> <PasteController type="menu" Tab={null} insert={this.insert} /> {config ? <Switch className="big" checkedChildren={dict['mob.enable']} unCheckedChildren={dict['mob.disable']} checked={config.enabled} onChange={this.onEnabledChange} /> : null} -- Gitblit v1.8.0