From e9c48bd7356462ba9257540b130a47a65ad1861d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 26 八月 2021 17:17:11 +0800 Subject: [PATCH] 2021-08-26 --- src/views/menudesign/index.jsx | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index 85e7fe4..937c911 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -48,6 +48,7 @@ sessionStorage.setItem('appType', '') // 搴旂敤绫诲瀷 document.body.className = '' window.GLOB.UserComponentMap = new Map() // 缂撳瓨鐢ㄦ埛鑷畾涔夌粍浠� +window.GLOB.TabsMap = new Map() // 缂撳瓨鐢ㄦ埛鎿嶄綔鐨勬爣绛鹃〉 window.GLOB.urlFields = [] // url鍙橀噺 window.GLOB.customMenu = null // 淇濆瓨鑿滃崟淇℃伅 @@ -103,6 +104,7 @@ MKEmitter.addListener('thawButtons', this.thawButtons) MKEmitter.addListener('copyButtons', this.copyButtons) MKEmitter.addListener('changePopview', this.initPopview) + MKEmitter.addListener('triggerMenuSave', this.triggerMenuSave) MKEmitter.addListener('submitComponentStyle', this.updateComponentStyle) MKEmitter.addListener('updateCustomComponent', this.updateCustomComponent) setTimeout(() => { @@ -123,8 +125,15 @@ MKEmitter.removeListener('thawButtons', this.thawButtons) MKEmitter.removeListener('copyButtons', this.copyButtons) MKEmitter.removeListener('changePopview', this.initPopview) + MKEmitter.removeListener('triggerMenuSave', this.triggerMenuSave) MKEmitter.removeListener('submitComponentStyle', this.updateComponentStyle) MKEmitter.removeListener('updateCustomComponent', this.updateCustomComponent) + } + + triggerMenuSave = () => { + if (this.state.visible) return + + this.submitConfig() } getAppPictures = () => { @@ -214,12 +223,7 @@ } delButtons = (items) => { - const { copyButtons } = this.state - - this.setState({ - delButtons: [...this.state.delButtons, ...items], - copyButtons: copyButtons.filter(item => !items.includes(item.uuid)) - }) + this.setState({ delButtons: [...this.state.delButtons, ...items] }) } copyButtons = (items) => { @@ -521,7 +525,7 @@ EasyCode: config.easyCode || '', Template: 'CustomPage', MenuName: config.MenuName || '', - PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab'}), + PageParam: JSON.stringify({Template: 'CustomPage', OpenType: config.OpenType || 'newtab', hidden: config.hidden || 'false'}), LongParam: window.btoa(window.encodeURIComponent(JSON.stringify(config))), open_edition: config.open_edition, LText: '', @@ -776,12 +780,7 @@ delButtons: [], copyButtons: [], thawButtons: [], - menuloading: false, - comloading: true - }, () => { - this.setState({ - comloading: false - }) + menuloading: false }) notification.success({ top: 92, @@ -793,6 +792,7 @@ menuloading: false }) } + MKEmitter.emit('completeSave') }) }, 300) } @@ -856,7 +856,7 @@ check(item.components) return } - if (['propcard', 'brafteditor', 'sandbox', 'stepform'].includes(item.subtype) && item.wrap.datatype === 'static') return + if (['propcard', 'brafteditor', 'sandbox', 'stepform', 'tabform'].includes(item.subtype) && item.wrap.datatype === 'static') return if (['balcony'].includes(item.type) && item.wrap.datatype === 'static') return if (item.setting) { -- Gitblit v1.8.0