表格组件
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user