web端-风采墙-统计分析: 饼状体和柱状图初始化异常修复;
This commit is contained in:
@@ -233,11 +233,12 @@ layout("/layouts/platform.html"){
|
|||||||
if (this.categoryChart) this.categoryChart.resize()
|
if (this.categoryChart) this.categoryChart.resize()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
this.loadCategories().then(() => this.loadAll())
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener("resize", this.resizeCharts)
|
window.addEventListener("resize", this.resizeCharts)
|
||||||
|
// 图表容器挂载完成后自动执行首次查询,避免必须点击“查询”才显示数据。
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.loadCategories().then(() => this.loadAll())
|
||||||
|
})
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener("resize", this.resizeCharts)
|
window.removeEventListener("resize", this.resizeCharts)
|
||||||
|
|||||||
Reference in New Issue
Block a user