Skip to content
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

computed的实现 #8

Open
fengguangpei opened this issue Aug 30, 2022 · 0 comments
Open

computed的实现 #8

fengguangpei opened this issue Aug 30, 2022 · 0 comments

Comments

@fengguangpei
Copy link

文章写的很好,有个地方和源码有出入,不知道是不是版本的问题

问题:计算属性不会通知视图更新,而是计算属性依赖的属性通知

计算属性的用到的属性变化时:
1、会通知计算属性的watcher把dirty设置为true,等待下一次取值
2、会通知使用这个计算属性的组件实例的watcher更新视图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant