-
Notifications
You must be signed in to change notification settings - Fork 915
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
vue会自动给vnode添加key吗? #341
Comments
所有更新都会触发diff算法。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vue渲染器在更新列表时,会触发diff算法,diff算法依赖vnode上的key做算法优化。但在写模版时,除了v-for渲染列表会手写key。其他情况并不会去手写key,如:
The text was updated successfully, but these errors were encountered: