nlrx-wjc / learn-vue-source-code Goto Github PK
View Code? Open in Web Editor NEW在线阅读:https://nlrx-wjc.github.io/Learn-Vue-Source-Code/
License: MIT License
在线阅读:https://nlrx-wjc.github.io/Learn-Vue-Source-Code/
License: MIT License
不太理解提到的静态节点和文本节点的区别在哪里,前面说只有六种节点,为什么现在出现了第七种节点呢?
文章写的很好,有个地方和源码有出入,不知道是不是版本的问题
问题:计算属性不会通知视图更新,而是计算属性依赖的属性通知
计算属性的用到的属性变化时:
1、会通知计算属性的watcher把dirty设置为true,等待下一次取值
2、会通知使用这个计算属性的组件实例的watcher更新视图
如题
优化阶段
如果type值为2,那么该节点是不包含变量的纯文本节点,它就肯定是静态节点,返回true;
应改为:
如果type值为3,那么该节点是不包含变量的纯文本节点,它就肯定是静态节点,返回true;
最后一句,~~看看Vue中的虚拟DOM时怎样的。~~应改为 是怎样的
https://nlrx-wjc.github.io/Learn-Vue-Source-Code/start/#_1-%E5%89%8D%E8%A8%80 说的是2.6.11版本 但是我看贴图上的nextTick的源码 不是2.6.11的源码 大佬~ 我特意去找了一下vue2库中的分支代码 https://github.com/vuejs/vue/blob/v2.6.11/src/core/util/next-tick.js 确实不一样, 没有 MessageChannel 与之对应的应该是 MutationObserver
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.