File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/views/dashboard/editor Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 3939 }, 100 )
4040 window .addEventListener (' resize' , this .__resizeHanlder )
4141 }
42+
43+ // 监听侧边栏的变化
44+ const sidebarElm = document .getElementsByClassName (' sidebar-container' )[0 ]
45+ sidebarElm .addEventListener (' transitionend' , this .__resizeHanlder )
4246 },
4347 beforeDestroy () {
4448 if (! this .chart ) {
4751 if (this .autoResize ) {
4852 window .removeEventListener (' resize' , this .__resizeHanlder )
4953 }
50- this .chart .dispose ();
51- this .chart = null ;
54+
55+ const sidebarElm = document .getElementsByClassName (' sidebar-container' )[0 ]
56+ sidebarElm .removeEventListener (' transitionend' , this .__resizeHanlder )
57+
58+ this .chart .dispose ()
59+ this .chart = null
5260 },
5361 methods: {
5462 initChart () {
You can’t perform that action at this time.
0 commit comments