diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-09-30 03:07:47 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-09-30 03:07:47 +0900 |
| commit | 18fa317ee70b5d570637407a3f8a2888ab27cb6f (patch) | |
| tree | 27a843e58394d2db0ab7168a8f37487ff3d2418c /src | |
| parent | fix: truncate image descriptions (#7699) (diff) | |
| download | sharkey-18fa317ee70b5d570637407a3f8a2888ab27cb6f.tar.gz sharkey-18fa317ee70b5d570637407a3f8a2888ab27cb6f.tar.bz2 sharkey-18fa317ee70b5d570637407a3f8a2888ab27cb6f.zip | |
fix bug
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/directives/tooltip.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/directives/tooltip.ts b/src/client/directives/tooltip.ts index ee690558af..32d137b2e2 100644 --- a/src/client/directives/tooltip.ts +++ b/src/client/directives/tooltip.ts @@ -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); |