fix: 修复边框选不上的问题

This commit is contained in:
wangjiahao 2022-03-01 16:51:38 +08:00
parent d9d96f01af
commit 2b41447a1b
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ export default {
},
computed: {
itemActive() {
return this.curComponent.commonBackground && this.curComponent.commonBackground.innerImage === this.template.url
return this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.innerImage === this.template.url
},
classBackground() {
if (this.template.url) {

View File

@ -102,7 +102,7 @@ export default {
}
},
mounted() {
if (this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
if (this.curComponent && this.curComponent.commonBackground && this.curComponent.commonBackground.outerImage && typeof (this.curComponent.commonBackground.outerImage) === 'string') {
this.fileList.push({ url: this.curComponent.commonBackground.outerImage })
}
this.backgroundOrigin = deepCopy(this.curComponent.commonBackground)