Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
hehehai opened this issue Sep 27, 2022 · 1 comment · May be fixed by #1687
Open
1 task done

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

hehehai opened this issue Sep 27, 2022 · 1 comment · May be fixed by #1687
Assignees
Labels
has: PR Has pull request type: 🐞 bug Something isn't working

Comments

@hehehai
Copy link
Contributor

hehehai commented Sep 27, 2022

基本信息

  • 依赖包名 及 版本: @arco-design/web-vue@2.37.3
  • 浏览器版本: chrome105.0.0.0

额外补充

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

预期结果

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

@hehehai hehehai added the type: 🐞 bug Something isn't working label Sep 27, 2022
@hehehai hehehai self-assigned this Sep 27, 2022
@hehehai
Copy link
Contributor Author

hehehai commented Sep 27, 2022

问题来源

if (
spacerWidth > 1 &&
(overflowNumber.value === 0 || spacerWidth < nextWidth.value)
) {
return;
}

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

💬 不使用 nextWidth

@hehehai hehehai linked a pull request Sep 27, 2022 that will close this issue
15 tasks
@hehehai hehehai linked a pull request Sep 27, 2022 that will close this issue
15 tasks
@hehehai hehehai added the has: PR Has pull request label Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: PR Has pull request type: 🐞 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant