We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
可以给网站加个评论功能吗,我在patch一章中的 patchChildren 一节 ,有个不同意见。
旧的 VNode 是一个只有一个子节点的 div 标签,而新的 VNode 是一个拥有多个子节点的 div 标签。最终的效果是旧的单个子节点被移除,新的多个子节点全都被添加上去。
这个旧的节点是不是可以复用的,不用删除。假设现在v-for渲染一个数组,开始只有一个子元素,后来push一个新的。这时候无需删除旧的子节点,而是应该只添加一个新增节点。
v-for
源码部分我还在阅读,如有理解方面问题,请指出
The text was updated successfully, but these errors were encountered:
先更新自身, 然后更新子节点 子节点时会判断,
Sorry, something went wrong.
No branches or pull requests
可以给网站加个评论功能吗,我在patch一章中的 patchChildren 一节 ,有个不同意见。

这个旧的节点是不是可以复用的,不用删除。假设现在
v-for
渲染一个数组,开始只有一个子元素,后来push一个新的。这时候无需删除旧的子节点,而是应该只添加一个新增节点。源码部分我还在阅读,如有理解方面问题,请指出
The text was updated successfully, but these errors were encountered: