fix:调整block内group闪烁的问题

This commit is contained in:
zhangyu
2022-01-24 10:41:05 +08:00
parent ba341cde24
commit ef6dba8589
3 changed files with 23 additions and 3 deletions

View File

@@ -125,7 +125,7 @@ export default {
}
}
if (chart.type === 95) {
chart.h += 1
chart.h += 0
}
if (!this.$_.isEmpty(chart.children)) {
chart.children.forEach(c => {

View File

@@ -121,7 +121,7 @@ export default {
if (item.params.collpase) {
item.h = 1
} else {
item.h = getGroupHeight(item.children) + 2
item.h = getGroupHeight(item.children) + 1
}
}
})

View File

@@ -1,7 +1,7 @@
<template>
<panel-chart-list
:time-filter="timeFilter"
:data-list="chartInfo.children"
:data-list="dataList"
:panel-lock="true"
:entity="entity"
>
@@ -17,7 +17,27 @@ export default {
props: {
timeFilter: Object
},
data () {
return {
dataList: [],
firstShow: false
}
},
watch: {
'chartInfo.children': {
immediate: true,
deep: true,
handle (n) {
if (!this.firstShow) {
this.dataList = JSON.parse(JSON.stringify(this.chartInfo.children))
this.firstShow = true
}
}
}
},
mounted () {
this.dataList = JSON.parse(JSON.stringify(this.chartInfo.children))
this.firstShow = true
}
}
</script>