mirror of
https://github.com/lana-k/sqliteviz.git
synced 2025-12-06 18:18:53 +08:00
change code structure
This commit is contained in:
19
src/tooltipMixin.js
Normal file
19
src/tooltipMixin.js
Normal file
@@ -0,0 +1,19 @@
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
tooltipStyle: {
|
||||
visibility: 'hidden'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showTooltip (e) {
|
||||
this.tooltipStyle.top = e.clientY - 12 + 'px'
|
||||
this.tooltipStyle.left = e.clientX + 12 + 'px'
|
||||
this.tooltipStyle.visibility = 'visible'
|
||||
},
|
||||
hideTooltip () {
|
||||
this.tooltipStyle.visibility = 'hidden'
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user