arco-design-vue icon indicating copy to clipboard operation
arco-design-vue copied to clipboard

OverflowList 当存在动态长度元素时,自动显隐异常

Open hehehai opened this issue 3 years ago • 1 comments

基本信息

  • 依赖包名 及 版本: @arco-design/[email protected]
  • 浏览器版本: chrome105.0.0.0

额外补充

2022-09-27 16-16-22 2022-09-27 16_17_11

预期结果

动态元素大小,会影响自动显隐

hehehai avatar Sep 27 '22 08:09 hehehai

问题来源 https://github.com/arco-design/arco-design-vue/blob/dd1fe553a5cfacd87cd28887961d5eb7a2601b36/packages/web-vue/components/overflow-list/overflow-list.tsx#L90-L95

这里使用了 nextWidth 做性能优化,当元素大小发送变化,这里的 nextWidth 是之前的值,无法做为新的宽度参考。

💬 不使用 nextWidth

hehehai avatar Sep 27 '22 08:09 hehehai