Skip to content

Commit 3738031

Browse files
committed
fix(popup): force update popper after animation completes
1 parent d865070 commit 3738031

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/popup/popup.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,9 @@ export default mixins(classPrefixMixins, getAttachConfigMixins('popup')).extend(
363363
}
364364
},
365365
onAfterEnter() {
366-
if (this.visible) {
367-
this.updatePopper();
366+
if (this.visible && this.popper) {
367+
// 动画完成后,元素已有正确尺寸,使用 forceUpdate 强制重新运行所有 modifiers
368+
this.popper.forceUpdate();
368369
}
369370
},
370371
onLeave() {

0 commit comments

Comments
 (0)