From 1b0fd0a20d54068f0f4716177780e00a75b860ef Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 10 一月 2020 17:12:34 +0800 Subject: [PATCH] 2020-01-10 --- src/components/sidemenu/editthdmenu/index.jsx | 28 +++++++++++++++++++++++++--- 1 files changed, 25 insertions(+), 3 deletions(-) diff --git a/src/components/sidemenu/editthdmenu/index.jsx b/src/components/sidemenu/editthdmenu/index.jsx index c8d4b19..721b40a 100644 --- a/src/components/sidemenu/editthdmenu/index.jsx +++ b/src/components/sidemenu/editthdmenu/index.jsx @@ -18,6 +18,7 @@ import './index.scss' const ComTableConfig = asyncLoadComponent(() => import('@/templates/comtableconfig')) +const FormTabConfig = asyncLoadComponent(() => import('@/templates/formtabconfig')) const ModalConfig = asyncLoadComponent(() => import('@/templates/modalconfig')) const SubTable = asyncLoadComponent(() => import('@/templates/subtableconfig')) @@ -447,7 +448,7 @@ } handleSubConfig = (item, originMenu, config, type) => { - if (type === 'button') { + if (type === 'button') { // 涓夌骇鑿滃崟椤甸潰锛屾寜閽厤缃� if (item.OpenType === 'pop') { let pageParam = '' if (config && config.type === 'Modal') { @@ -462,7 +463,7 @@ tabview: 'Modal' }) } - } else if (type === 'tab') { + } else if (type === 'tab') { // 涓夌骇鑿滃崟椤甸潰锛屾爣绛鹃厤缃� if (item.type === 'SubTable' || item.tabType === 'SubTable') { this.setState({ editMenu: originMenu, @@ -471,7 +472,7 @@ tabview: 'SubTable' }) } - } else if (type === 'tabButton') { + } else if (type === 'tabButton') { // 涓夌骇鑿滃崟涓嬶紝鏍囩涓嬶紝鎸夐挳閰嶇疆 let pageParam = '' if (config && config.type === 'Modal') { pageParam = config @@ -482,6 +483,18 @@ editAction: item, btnParam: pageParam, tabview: 'Modal' + }) + } else if (type === 'tabview') { // 涓夌骇鑿滃崟涓嬶紝鎵撳紑鏂版爣绛鹃〉鎴栧綋鍓嶉〉璺宠浆锛岀被鍨嬬殑鎸夐挳閰嶇疆 + let pageParam = '' + if (config && config.type === 'formTab') { + pageParam = config + } + + this.setState({ + editMenu: originMenu, + editAction: item, + btnParam: pageParam, + tabview: 'FormTab' }) } } @@ -623,6 +636,15 @@ handleSubConfig={this.handleSubConfig} /> } + {this.state.tabview === 'FormTab' && + <FormTabConfig + menu={this.state.editMenu} + config={this.state.btnParam} + editAction={this.state.editAction} + handleConfig={this.handleConfig} + handleSubConfig={this.handleSubConfig} + /> + } {/* 鍥剧墖棰勮 */} <Preview cancel={this.cancelPrePicture} preview={this.state.preview} template={this.state.pretemplate} confirm={this.useTemplate}/> {/* 瑙e喕鑿滃崟妯℃�佹 */} -- Gitblit v1.8.0