-

-

-

-

+

+

+

+
{{ 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 }
}