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) { if (chart.type === 95) {
chart.h += 1 chart.h += 0
} }
if (!this.$_.isEmpty(chart.children)) { if (!this.$_.isEmpty(chart.children)) {
chart.children.forEach(c => { chart.children.forEach(c => {

View File

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

View File

@@ -1,7 +1,7 @@
<template> <template>
<panel-chart-list <panel-chart-list
:time-filter="timeFilter" :time-filter="timeFilter"
:data-list="chartInfo.children" :data-list="dataList"
:panel-lock="true" :panel-lock="true"
:entity="entity" :entity="entity"
> >
@@ -17,7 +17,27 @@ export default {
props: { props: {
timeFilter: Object 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 () { mounted () {
this.dataList = JSON.parse(JSON.stringify(this.chartInfo.children))
this.firstShow = true
} }
} }
</script> </script>