diff --git a/nezha-fronted/src/components/page/dashboard/explore/exploreItemHtml.vue b/nezha-fronted/src/components/page/dashboard/explore/exploreItemHtml.vue index de1df4053..7d90dc7fd 100644 --- a/nezha-fronted/src/components/page/dashboard/explore/exploreItemHtml.vue +++ b/nezha-fronted/src/components/page/dashboard/explore/exploreItemHtml.vue @@ -164,6 +164,7 @@ export default { } this.chartUnit = this.dataJson.unit || 1 this.expressionChange() + window.addEventListener('resize', this.logsCollapseChange) }, methods: { logsCollapseChange (activeNames, a, b) { @@ -562,6 +563,9 @@ export default { this.expressionChange() } } + }, + beforeDestroy () { + window.removeEventListener('resize', this.logsCollapseChange) } }