mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 03:35:12 +00:00
fix bug
This commit is contained in:
parent
414f1d1158
commit
18fa317ee7
1 changed files with 7 additions and 2 deletions
|
@ -36,7 +36,7 @@ export default {
|
|||
});
|
||||
}
|
||||
|
||||
const show = e => {
|
||||
self.show = () => {
|
||||
if (!document.body.contains(el)) return;
|
||||
if (self._close) return;
|
||||
if (self.text == null) return;
|
||||
|
@ -60,7 +60,7 @@ export default {
|
|||
el.addEventListener(start, () => {
|
||||
clearTimeout(self.showTimer);
|
||||
clearTimeout(self.hideTimer);
|
||||
self.showTimer = setTimeout(show, delay);
|
||||
self.showTimer = setTimeout(self.show, delay);
|
||||
}, { passive: true });
|
||||
|
||||
el.addEventListener(end, () => {
|
||||
|
@ -75,6 +75,11 @@ export default {
|
|||
});
|
||||
},
|
||||
|
||||
updated(el, binding) {
|
||||
const self = el._tooltipDirective_;
|
||||
self.text = binding.value as string;
|
||||
},
|
||||
|
||||
unmounted(el, binding, vn) {
|
||||
const self = el._tooltipDirective_;
|
||||
clearInterval(self.checkTimer);
|
||||
|
|
Loading…
Reference in a new issue