表格组件

This commit is contained in:
yanran200730
2023-03-15 15:18:19 +08:00
parent 106535fc01
commit 529e0ddccf
7 changed files with 87 additions and 55 deletions

View File

@@ -37,6 +37,7 @@
:stripe="data.stripe"
:theme="theme"
:isShowIndex="data.isShowIndex"
:config="dvTableConfig"
:data="values">
</AiDvTable>
<AiRanking
@@ -87,7 +88,8 @@ export default {
chartList,
map: null,
lib: null,
timer: null
timer: null,
dvTableConfig: []
}
},
computed: {
@@ -103,12 +105,24 @@ export default {
currentType: v => v.data.type
},
watch: {
data: {
values: {
immediate: true,
deep: true, handler() {
if (this.currentType == 'map') {
// this.renderMap()
}
if (this.currentType === 'AiDvTable') {
this.dvTableConfig = this.data[this.data.dataType].map((v, i) => {
return {
color: this.data.config[i] ? (this.data.config[i].color || '') : '',
width: this.data.config[i] ? (this.data.config[i].width || '') : '',
align: this.data.config[i] ? (this.data.config[i].align || '') : ''
}
})
this.data.config = this.dvTableConfig
}
}
}
},