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
jQuery是命令式操作DOM,vue.js是声明式操作DOM。命令式是通过命令每一步去做,达到想要的效果。声明式是告诉对方想要的效果,不需要关心如何去做。
通过状态生成一个虚拟节点树,然后使用虚拟节点树进行渲染。在渲染之前,会使用新生成的虚拟节点树和上一次生成的虚拟节点树进行对比,只渲染不同的部分。
避免不必要的DOM操作,节省一定的性能开销。
由于使用变化侦测可以更改细粒度。vue.js1.0因为细粒度太细,内存和依赖追踪开销过大。Vue.js2.0采用中等粒度,组件级别是一个Watcher实例,组件内部采用虚拟DOM渲染视图,大大缩减依赖数量和Watcher数量。
参考 刘博文的《深入浅出Vue.js》
The text was updated successfully, but these errors were encountered:
参考 刘博文的《深入浅出Vue.js》 参考 揭秘Vue中的Virtual Dom 参考 Vue源码剖析——render、patch、updata、vnode
Sorry, something went wrong.
No branches or pull requests
虚拟DOM
参考 刘博文的《深入浅出Vue.js》
The text was updated successfully, but these errors were encountered: