From d4c2669215ef211e52496e69a89010a9b545e04a Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 06 九月 2021 19:06:28 +0800 Subject: [PATCH] 2021-09-06 --- src/menu/popview/index.jsx | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/menu/popview/index.jsx b/src/menu/popview/index.jsx index bed4339..1e7c6a6 100644 --- a/src/menu/popview/index.jsx +++ b/src/menu/popview/index.jsx @@ -19,6 +19,7 @@ const { confirm } = Modal const MenuForm = asyncComponent(() => import('./menuform')) +const Versions = asyncComponent(() => import('@/menu/versions')) const Header = asyncComponent(() => import('@/menu/header')) const SourceWrap = asyncComponent(() => import('@/menu/modulesource')) const MenuShell = asyncComponent(() => import('@/menu/menushell')) @@ -39,9 +40,7 @@ state = { dict: sessionStorage.getItem('lang') !== 'en-US' ? zhCN : enUS, - MenuType: '', MenuId: '', - MenuNo: '', delButtons: [], activeKey: 'basedata', menuloading: false, @@ -556,9 +555,21 @@ window.GLOB.customMenu = config } + refreshConfig = () => { + this.setState({ + delButtons: [], + activeKey: 'basedata', + menuloading: false, + oriConfig: null, + config: null, + }, () => { + this.getMenuParam() + }) + } + render () { const { btn } = this.props - const { activeKey, MenuType, dict, config, menuloading, customComponents } = this.state + const { activeKey, dict, config, menuloading, customComponents, MenuId } = this.state return ( <div className="pc-poper-view"> @@ -576,10 +587,10 @@ </Panel> {/* 缁勪欢娣诲姞 */} <Panel header={dict['mob.component']} key="component"> - <SourceWrap MenuType={MenuType} /> + <SourceWrap MenuType="" /> </Panel> {customComponents && customComponents.length ? <Panel header="鑷畾涔夌粍浠�" key="cuscomponent"> - <SourceWrap components={customComponents} MenuType={MenuType} /> + <SourceWrap components={customComponents} MenuType="" /> </Panel> : null} <Panel header={'椤甸潰鑳屾櫙'} key="background"> {config ? <BgController config={config} updateConfig={this.updateConfig} /> : null} @@ -594,6 +605,7 @@ <div> {config && config.MenuName} </div> } bordered={false} extra={ <div> + <Versions MenuId={MenuId} open_edition={config ? config.open_edition : ''} updateConfig={this.refreshConfig}/> <ReplaceField type="custom" config={config} updateConfig={this.resetConfig}/> <StyleCombControlButton menu={config} /> <PasteController type="menu" Tab={null} insert={this.insert} /> -- Gitblit v1.8.0