From 72d8b656b035de45a947166f79d56639f108f784 Mon Sep 17 00:00:00 2001 From: megumiimai Date: Mon, 15 Sep 2025 23:30:19 +0900 Subject: [PATCH] Update tooltip position on content change --- packages/tooltip/src/main.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/tooltip/src/main.js b/packages/tooltip/src/main.js index dc930ec58d4..235bbc39bc0 100644 --- a/packages/tooltip/src/main.js +++ b/packages/tooltip/src/main.js @@ -69,6 +69,22 @@ export default { data: { node: '' }, render(h) { return this.node; + }, + updated() { + if (this.showPopper && this.popperJS) { + this.$nextTick(() => { + this.updatePopper(); + }); + } + }, + watch: { + node() { + if (this.showPopper && this.popperJS) { + this.$nextTick(() => { + this.updatePopper(); + }); + } + } } }).$mount(); @@ -239,4 +255,4 @@ export default { off(reference, 'click', this.removeFocusing); } } -}; +}; \ No newline at end of file