NEZ-963 chart 鼠标移入悬浮提示
This commit is contained in:
26
nezha-fronted/src/components/common/mixin/chartDataList.js
Normal file
26
nezha-fronted/src/components/common/mixin/chartDataList.js
Normal 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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user