From e22375e973056c52a112502ef67117b44a6110f5 Mon Sep 17 00:00:00 2001 From: dai_siki <851733175@qq.com> Date: Sat, 21 Mar 2020 11:40:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E7=AB=AF=E8=81=94=E8=B0=83=E5=BC=80?= =?UTF-8?q?=E5=A7=8B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/modules/wx-mini/index-set.vue | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/epmet-oper-web/src/views/modules/wx-mini/index-set.vue b/epmet-oper-web/src/views/modules/wx-mini/index-set.vue index 083f822..78b3a21 100644 --- a/epmet-oper-web/src/views/modules/wx-mini/index-set.vue +++ b/epmet-oper-web/src/views/modules/wx-mini/index-set.vue @@ -37,10 +37,10 @@
- - - - + + + + {{ item.functionName }} @@ -568,6 +568,7 @@ export default { await this.getCptTypeList() await this.getCptList() this.toStep(2) + this.cleanFocusCpt() loadingInstance.close() }, processBackendCptData (item) { @@ -761,19 +762,19 @@ export default { const tempOnlyId = getRandomString(20) if (regionType === 'top') { if (this.topCptList.length > 0) { - + this.$message('标题区已有组件,请删除后再添加') } else { this.addCpt(item, tempOnlyId, 1) } } else if (regionType === 'ban') { if (this.banCptList.length > 0) { - + this.$message('置顶区已有组件,请删除后再添加') } else { this.addCpt(item, tempOnlyId, 2) } } else if (regionType === 'fixed') { if (this.fixedCptList.length > 0) { - + this.$message('浮窗区已有组件,请删除后再添加') } else { this.addCpt(item, tempOnlyId, 3) } @@ -821,12 +822,16 @@ export default { checkExistCpt (item) { return this.cptList.some(cptItem => item.componentFrontId === cptItem.componentFrontId) }, + // 清空聚焦实例组件 + cleanFocusCpt () { + this.focusedCpt = { tempOnlyId: '' } + }, // 聚焦实例组件 focusCpt (item) { console.log('聚焦实例组件') if (this.isInPreview) return if (this.focusedCpt.tempOnlyId === item.tempOnlyId) { - this.focusedCpt = { tempOnlyId: '' } + this.cleanFocusCpt() } else { this.focusedCpt = { ...cloneDeep(item), demoData: JSON.stringify(item.demoData), configuration: JSON.stringify(item.configuration), demoIsUnfold: true, confIsUnfold: false } }