Skip to content

Conversation

@RSS1102
Copy link
Collaborator

@RSS1102 RSS1102 commented Oct 23, 2025

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

原因:

  • Popper 在 expandAnimation 动画开始前创建可能尺寸为 0
    flip modifier 检测时认为"不会溢出"(因为尺寸是 0)
    选择了初始的 placement: right-start

  • 后续即使动画完成后元素有了正确尺寸update() 只调整位置,不会重新选择 placement
    所以始终停留在 right-start,不会翻转到 top

解决方法
使用 forceUpdate 强制重新运行所有 modifiers 的完整生命周期


可能会影响 SelectSelectInputDropdownPopconfirmStickyItemTooltipGuide 等使用 Popup 组件

📝 更新日志

  • fix(menu): 修复菜单项自动翻转失效

  • 本条 PR 不需要纳入 Changelog

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

完成

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 23, 2025

tdesign-vue2-demo-compiler-2-6

npm i https://pkg.pr.new/tdesign-vue@3744

commit: 3738031

@RSS1102 RSS1102 changed the title fix(popup): popper target element selection logic fix(menu): fix menu item auto-flip failure Oct 23, 2025
@RSS1102 RSS1102 force-pushed the rss1102/fix/menu-item/auto-flip branch from b0b33b9 to 3738031 Compare November 4, 2025 02:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants