This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
nezha-nezha-fronted/nezha-fronted/src/components/common/mixin/chartDataList.js
2021-09-02 14:43:06 +08:00

27 lines
507 B
JavaScript

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)
}
}