Skip to content
Snippets Groups Projects
Unverified Commit a03d1eda authored by 花裤衩's avatar 花裤衩 Committed by GitHub
Browse files

fix[LineChart]: fixed transitionend bug (#1045)

parent 2938e33d
No related branches found
No related tags found
No related merge requests found
......@@ -56,7 +56,7 @@ export default {
// 监听侧边栏的变化
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
sidebarElm.addEventListener('transitionend', this.__resizeHandler)
sidebarElm.addEventListener('transitionend', this.sidebarResizeHandler)
},
beforeDestroy() {
if (!this.chart) {
......@@ -67,12 +67,17 @@ export default {
}
const sidebarElm = document.getElementsByClassName('sidebar-container')[0]
sidebarElm.removeEventListener('transitionend', this.__resizeHandler)
sidebarElm.removeEventListener('transitionend', this.sidebarResizeHandler)
this.chart.dispose()
this.chart = null
},
methods: {
sidebarResizeHandler(e) {
if (e.propertyName === 'width') {
this.__resizeHandler()
}
},
setOptions({ expectedData, actualData } = {}) {
this.chart.setOption({
xAxis: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment