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

table组件设置scroll后会导致表格频繁的重新渲染 #1705

Closed
1 task
zhuojun1024 opened this issue Jan 10, 2020 · 4 comments
Closed
1 task

table组件设置scroll后会导致表格频繁的重新渲染 #1705

zhuojun1024 opened this issue Jan 10, 2020 · 4 comments
Labels

Comments

@zhuojun1024
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.4.10

Environment

系统版本:Windows 10 教育版 1909 ;浏览器版本:Chrome 79.0.3945.117(正式版本)(64 位);Vue版本:2.6.11

Reproduction link

Edit on CodeSandbox

Steps to reproduce

打开重现链接,在两个输入框中任意输入内容,“幸运数字”一列会随着变化,去掉table的scroll后,任意输入内容,“幸运数字”一列则不会改变。

What is expected?

只有table使用到的相关变量改变,或者页面大小发生变化,才会导致表格重新渲染

What is actually happening?

设置scroll后,当前Vue实例的任何变量发生变化,都会导致表格重新渲染

@tangjinzhou
Copy link
Member

@tangjinzhou
Copy link
Member

把 scroll 的配置改成变量存储在data中

@zhuojun1024
Copy link
Author

把滚动的配置改成变量存储在数据中

十分感谢,但反复测试之后,发现设置了@change事件后也有这个问题:https://codesandbox.io/s/purple-dawn-pkb3x

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants