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

Select:fix Select box jitter when the window is zoomed bug(对应issue:#21142) #21143

Closed
wants to merge 1 commit into from

Conversation

caoshining
Copy link

@caoshining caoshining commented Jul 13, 2021

移出动态监听致使持续重绘 导致的高度持续更改,解决对应问题 对应 #21142

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow Element's contributing guide (中文 | English | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer relative issues for you PR.

@element-bot
Copy link
Member

✔️ Deploy Preview for element ready!

🔨 Explore the source changes: 5e150cb

🔍 Inspect the deploy log: https://app.netlify.com/sites/element/deploys/60edd46d0514810007436a3b

😎 Browse the preview: https://deploy-preview-21143--element.netlify.app/

@caoshining
Copy link
Author

caoshining commented Jul 17, 2021

Hi! Element UI team! Thanks for creating such an excellent UI library.

Window zoom jitters when multiple selection occurs,The component is constantly updating its calculations,I think it is the jitter caused by the real-time calculation of the setting height within the component

@cs1707

@caoshining caoshining changed the title Select:fix 多选时窗口缩放会抖动 bug(对应issue:#21142) Select:fix Select box jitter when the window is zoomed bug(对应issue:#21142) Jul 17, 2021
@@ -795,7 +795,6 @@

handleResize() {
this.resetInputWidth();
if (this.multiple) this.resetInputHeight();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这行不能删

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

但是一直重新计算的问题是这个引起的 能解决下吗?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cs1707 老哥 你看348 行已经监听value来重置高度了,handleResize的绑定那就会无限触发,只要我新增或者移除一个选项,你可以对比下看下348行 已经在重算和重置高度了 那你这行监听大小变化不久一直会触发了?无限循环了 只用value更改的时候重置就够了 你不信你可以跑一下我改的这个代码试下 解决了了这个issue ,麻烦看下 谢谢

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.

3 participants