wi
This commit is contained in:
parent
5f3f9e2f8f
commit
cb965feab4
14 changed files with 122 additions and 146 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import { Directive } from 'vue';
|
||||
import MkTooltip from '../components/ui/tooltip.vue';
|
||||
import { isDeviceTouch } from '../scripts/is-device-touch';
|
||||
|
||||
|
|
@ -5,7 +6,7 @@ const start = isDeviceTouch ? 'touchstart' : 'mouseover';
|
|||
const end = isDeviceTouch ? 'touchend' : 'mouseleave';
|
||||
|
||||
export default {
|
||||
bind(el: HTMLElement, binding, vn) {
|
||||
mounted(el: HTMLElement, binding, vn) {
|
||||
const self = (el as any)._tooltipDirective_ = {} as any;
|
||||
|
||||
self.text = binding.value as string;
|
||||
|
|
@ -55,8 +56,8 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
unbind(el, binding, vn) {
|
||||
unmounted(el, binding, vn) {
|
||||
const self = el._tooltipDirective_;
|
||||
clearInterval(self.checkTimer);
|
||||
},
|
||||
};
|
||||
} as Directive;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue