NEZ-963 chart 鼠标移入悬浮提示

This commit is contained in:
@changcode
2021-09-02 14:43:06 +08:00
parent cfdb06bd39
commit 1afdff8de1
11 changed files with 108 additions and 12 deletions

View File

@@ -0,0 +1,26 @@
export default {
data () {
return {
chartDataList: false,
timer: null
}
},
methods: {
// 鼠标移入加入class
changeActive () {
// 设置定时器
this.timer = window.setTimeout(() => {
this.chartDataList = true
}, 500)
},
removeActive () {
// 移除定时器
window.clearInterval(this.timer)
this.chartDataList = false
}
},
beforeDestroy () {
// 移除定时器
window.clearInterval(this.timer)
}
}