CN-153 fix: 修复二级下拉列表加载过程中显示no data字样的问题

This commit is contained in:
chenjinsong
2021-09-26 14:01:16 +08:00
parent 77ec21b5d0
commit 5e7eab6a3d
2 changed files with 34 additions and 27 deletions

View File

@@ -12,7 +12,11 @@
:size="'mini'"
:height="'100%'">
<el-table-column type="expand" :min-width="'5%'">
<template #default="props" style="height: auto">
<template #default="props">
<div style="position: relative">
<div class="chart__loading" style="top: 0; height: 100%; z-index: 1;" v-show="loading">
<i class="el-icon-loading"></i>
</div>
<el-table
tooltip-effect="light"
class="expand-table"
@@ -46,6 +50,7 @@
</span>
</el-table-column>
</el-table>
</div>
</template>
</el-table-column>
<el-table-column
@@ -166,11 +171,13 @@ export default {
prop: 'bytes',
width: '18%'
}
]
],
loading: true
}
},
methods: {
currentChange (row, expandedRows) {
this.loading = true
this.childrenTableData = []
if (this.expandRowKeys[0] && (row.domain === this.expandRowKeys[0])) {
this.expandRowKeys = []
@@ -191,6 +198,7 @@ export default {
this.childrenTableData = response2.data.result
}
}).finally(() => {
this.loading = false
})
}, 500)
},

View File

@@ -611,7 +611,6 @@ export default {
this.singleValue.icon = chartParams.icon
const gotData = new Promise(resolve => {
if (chartParams.dataKey) {
console.info(this.parentData, chartParams)
if (this.parentData && this.parentData[chartParams.dataKey]) {
this.singleValue.value = this.parentData[chartParams.dataKey]
} else {