Vue的源码解析

https://www.cnblogs.com/libin-1/p/6845669.html   参考

vue虚拟DOM 的底层  使用了DomcumentFragment  api  先创建一个内存池  将真实dom放进该内存池中 然后统一修改后再将节点通过appendchild()方法放回真实dom中

具体请参考本人github项目 https://github.com/woshiitdaniu/Simple-Vue/tree/add-observer/js 

如需要获取具体的执行过程,请自行打点调式^_^

猜你喜欢

转载自blog.csdn.net/weixin_41421227/article/details/88086495