大屏表格组件bug

This commit is contained in:
yanran200730
2023-03-15 11:02:13 +08:00
parent d66760f9c2
commit 999f6190dc
3 changed files with 12 additions and 3 deletions

View File

@@ -14,7 +14,7 @@
}"
v-for="(item, index) in componentList"
:key="index">
<ai-dv-render :instance="instance" :data="item" :index="index" :theme="dashboard.theme"/>
<ai-dv-render :instance="instance" :key="index" :data="item" :index="index" :theme="dashboard.theme"/>
</div>
</div>
<components v-else :is="component" :dict="dict" :instance="instance" :nav="meta"/>

View File

@@ -88,7 +88,6 @@
}
const headerKey = Object.keys(value[0])[0]
console.log(Object.keys(value[0]))
const bodyKey = Object.keys(value[0]).filter(v => {
return v !== headerKey && ['color', 'width', 'align'].indexOf(v) === -1
})

View File

@@ -218,8 +218,18 @@ export default {
}
},
watch: {
config: {
handler (v) {
this.data = v[v.dataType]
},
deep: true,
immediate: true
}
},
created() {
this.data = this.config[this.config.dataType]
}
}
</script>