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/views/menudesign/index.jsx |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx
index bb5e513..b162520 100644
--- a/src/views/menudesign/index.jsx
+++ b/src/views/menudesign/index.jsx
@@ -34,6 +34,7 @@
 const PasteController = asyncComponent(() => import('@/menu/pastecontroller'))
 const PaddingController = asyncComponent(() => import('@/menu/padcontroller'))
 const StyleController = asyncComponent(() => import('@/menu/stylecontroller'))
+const ReplaceField = asyncComponent(() => import('@/menu/replaceField'))
 const SysInterface = asyncComponent(() => import('@/menu/sysinterface'))
 const UrlFieldComponent = asyncComponent(() => import('@/menu/urlfieldcomponent'))
 const PictureController = asyncComponent(() => import('@/menu/picturecontroller'))
@@ -899,6 +900,17 @@
     window.GLOB.customMenu = config
   }
 
+  resetConfig = (config) => {
+    this.setState({
+      config: {...config, components: []}
+    }, () => {
+      this.setState({
+        config: config
+      })
+    })
+    window.GLOB.customMenu = config
+  }
+
   insert = (item) => {
     let config = fromJS(this.state.config).toJS()
 
@@ -968,6 +980,7 @@
                   <div> {config && config.MenuName} </div>
                 } bordered={false} extra={
                   <div>
+                    <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/>
                     <SysInterface config={config} updateConfig={this.updateConfig}/>
                     <PictureController/>
                     <StyleCombControlButton menu={config} />

--
Gitblit v1.8.0