在tab内部定义多个echart。切换tab时候发现 echart图形宽度变成100px;聚合成一坨
这里只需要在tab 的click事件中吗,加入
this.$nextTick(() => {
。。。。
})
"activeName" @tab-click="handleClick">
//tab选择事件
handleClick(tab, event) {
let tabPageName = tab.paneName;
if(tabPageName==="first"){
this.tabPageIndex=0;
this.$nextTick(() => {
this.drawLine();//历史曲线
})
}else if(tabPageName==="second"){
this.tabPageIndex=1;
this.$nextTick(() => {
this.drawNHLine();
})
}
},