根据账号切换图表时 不能使用v-show( 图表切换时宽度有问题) --用样式切换
.hide{opacity:0,height:0}
<div :class="['overview-content',haveAccountType==0?'':'hide']"> </div>
<overviewChildren :class="[haveAccountType==1?'':'hide']"></overviewChildren>
computed:{
// 账号类型 0-母账号 1-子账号
haveAccountType() {
if (this.$store.state.user.name == “admin”) {
return 0;
} else {
return 1;
}
},
},