We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
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
[vue] 你了解vue的diff算法吗?
The text was updated successfully, but these errors were encountered:
说实话没有阅读过源码
大概说一下自己的猜测: 如一个list中某一个数据发生变更时, vue中会对整个list进行遍历, 判断使用到的某些属性是否发生变更, 从而更新发生变更的item 所以key属性才会显得很重要, 它会告诉你, 我那个item发生变更, 而不是去检测整个list
Sorry, something went wrong.
https://www.cnblogs.com/wind-lanyan/p/9061684.html
https://slbyml.github.io/QA/vue.html#%E7%AE%80%E8%BF%B0vue%E4%B8%AD%E7%9A%84dom-diff%E7%AE%97%E6%B3%95
我的理解:计算出虚拟 DOM 中真正变化的部分,并且只针对该部分进行 DOM 更新,而非重新渲染整个页面
No branches or pull requests
[vue] 你了解vue的diff算法吗?
The text was updated successfully, but these errors were encountered: