feat:dashboard overview页面 给asset tooltip消失时添加定时器 优化asset tooltip的切换的闪烁问题

This commit is contained in:
zhangyu
2021-01-20 10:33:03 +08:00
parent bfbd7253d6
commit 4f8a7a6f49
2 changed files with 93 additions and 68 deletions

View File

@@ -104,6 +104,7 @@
},
boxWidth:'',
LRTriangle:true,//true 左三角 false 右
timer:null,
}
},
methods:{
@@ -249,9 +250,11 @@
});
},
changeAsset(data,e){
if(this.timer){
clearTimeout(this.timer);
}
this.assetData.id=data;
let boxWidth=document.getElementsByClassName('content-right')[0].offsetWidth;
console.log(boxWidth);
this.boxWidth=boxWidth;
// this.assetData.rate=window.screen.height/1297;
this.$nextTick(()=>{
@@ -285,7 +288,18 @@
}
},
closeAsset(){
this.assetData.show=false
if(!this.timer){
this.timer=setTimeout(()=>{
this.assetData.show=false;
this.timer=null;
},100)
}else{
clearTimeout(this.timer);
this.timer=setTimeout(()=>{
this.assetData.show=false;
this.timer=null;
},100)
}
},
endLoading(){
this.loading=false;