fix: 仪表板选项卡未选择视图时拖动报错

This commit is contained in:
fit2cloud-chenyw 2021-10-14 14:58:35 +08:00
parent 74ec45a458
commit 03ab93664d
2 changed files with 5 additions and 2 deletions

View File

@ -211,7 +211,10 @@ export default {
created() {
this.refId = uuid.v1
// this.filter.filter = this.$store.getters.conditions
this.getData(this.element.propValue.viewId)
if (this.element && this.element.propValue && this.element.propValue.viewId) {
this.getData(this.element.propValue.viewId)
}
// this.initAreas()
},
mounted() {

View File

@ -35,7 +35,7 @@
</span>
<div v-if="activeTabName === item.name" class="de-tab-content">
<user-view v-if="item.content" :ref="item.name" :element="item.content" :out-style="outStyle" />
<user-view v-if="item.content && item.content.propValue && item.content.propValue.viewId" :ref="item.name" :element="item.content" :out-style="outStyle" />
</div>
</el-tab-pane>