| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix(tabs): 修复 showMoreTabs 模式下 overflow 计算滞后导致下拉菜单未及时更新(#4279) (#4272) * fix(tabs): fix showMoreTabs overflow calculation lag caused by CSS transition The nav element has CSS transition: transform 0.3s, which causes getBoundingClientRect() to return pre-transition positions when calcMorePanes runs in requestAnimationFrame (before the transition has advanced). Fix: use tab-relative-to-nav position delta (transition-invariant since both share the same transform coordinate space) plus navOffset to compute the final expected positions, bypassing the transition intermediate state entirely. Also replace nextTick with requestAnimationFrame in deferred calcMorePanes calls to ensure all cascading DOM updates from scrollToActiveTab -> updated() chains have settled. * fix(tab-nav): trigger calcMorePanes after scrollPrev/scrollNext arrow click * test(tabs): 修正 custom-more-icon 溢出下拉数量断言 showMoreTabs 溢出计算修正后按真实布局计算,容器 400px 减去 更多按钮占位后仅 5 个 tab 完整可见,下拉应为 Tab 6/7/8 共 3 项, 原断言 2 是基于旧实现 mount 早期量宽了 navScroll 的错误结果。 | 1 天前 | |
fix(vue-renderless/tab-nav): delay initial mounted to nextTick (#4220) * fix(vue-renderless/tab-nav): delay initial mounted to nextTick Ensure scrollToActiveTab runs after DOM/layout stabilizes on first mount. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(vue-renderless/tab-nav): defer mounted init via nextTick in renderless Use single-layer mounted and call it from onMounted so scroll runs after DOM layout without currying. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> | 1 个月前 |