CN-153 fix: 修复二级下拉列表加载过程中显示no data字样的问题
This commit is contained in:
@@ -12,7 +12,11 @@
|
|||||||
:size="'mini'"
|
:size="'mini'"
|
||||||
:height="'100%'">
|
:height="'100%'">
|
||||||
<el-table-column type="expand" :min-width="'5%'">
|
<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
|
<el-table
|
||||||
tooltip-effect="light"
|
tooltip-effect="light"
|
||||||
class="expand-table"
|
class="expand-table"
|
||||||
@@ -46,6 +50,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -166,11 +171,13 @@ export default {
|
|||||||
prop: 'bytes',
|
prop: 'bytes',
|
||||||
width: '18%'
|
width: '18%'
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
loading: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
currentChange (row, expandedRows) {
|
currentChange (row, expandedRows) {
|
||||||
|
this.loading = true
|
||||||
this.childrenTableData = []
|
this.childrenTableData = []
|
||||||
if (this.expandRowKeys[0] && (row.domain === this.expandRowKeys[0])) {
|
if (this.expandRowKeys[0] && (row.domain === this.expandRowKeys[0])) {
|
||||||
this.expandRowKeys = []
|
this.expandRowKeys = []
|
||||||
@@ -191,6 +198,7 @@ export default {
|
|||||||
this.childrenTableData = response2.data.result
|
this.childrenTableData = response2.data.result
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -611,7 +611,6 @@ export default {
|
|||||||
this.singleValue.icon = chartParams.icon
|
this.singleValue.icon = chartParams.icon
|
||||||
const gotData = new Promise(resolve => {
|
const gotData = new Promise(resolve => {
|
||||||
if (chartParams.dataKey) {
|
if (chartParams.dataKey) {
|
||||||
console.info(this.parentData, chartParams)
|
|
||||||
if (this.parentData && this.parentData[chartParams.dataKey]) {
|
if (this.parentData && this.parentData[chartParams.dataKey]) {
|
||||||
this.singleValue.value = this.parentData[chartParams.dataKey]
|
this.singleValue.value = this.parentData[chartParams.dataKey]
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user