learnVue
learnVue copied to clipboard
依赖收集里的这行代码是什么意思?怎么感觉缺东西
class Vue {
constructor(options) {
this._data = options.data;
observer(this._data, options.render);
let watcher = new Watcher(this, ); // 这括号里是没写完吗
}
}
这里应该是实例化一个渲染watcher,在watcher里面会执行updateComponent回调
我也觉得依赖收集这里代码不完整,还有Dep.target=null的执行位置是不是不对?
这里应该也是要传一个options.render吧
new Watcher(this, null, options.render)