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

Vue如何处理计算属性中不需要使用的依赖 #73

Open
jiang-24-gdufs opened this issue Jan 2, 2020 · 1 comment
Open

Vue如何处理计算属性中不需要使用的依赖 #73

jiang-24-gdufs opened this issue Jan 2, 2020 · 1 comment

Comments

@jiang-24-gdufs
Copy link

计算属性
a(){
const b = this.b;
return 1;
}
逻辑上a对b是没有依赖关系的, 但是Vue能分辨吗? getter执行时一样会进入b的getter并添加依赖呀.
Vue内部有这部分处理的相关代码吗?

@yuningjiang123
Copy link

不需要的依赖你写进去干嘛

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

2 participants