-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
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
模拟代码错误 #62
Comments
我理解错了。看样子是第一次执行observe,是不会收集到依赖。new wathcer 的时候触发getter, 这时候,在getter执行的时候,收集到依赖。这是可行的。但是那个Dep.target的重置为null的操作,不知道为什么放到外边来。new Vue之后,应该就可以重置为null了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
开始依赖收集
class Vue { constructor(options) { this._data = options.data; observer(this._data, options.render); let watcher = new Watcher(this, ); } }
The text was updated successfully, but these errors were encountered: