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

使用vuex只能一个个的computed吗 #34

Closed
infyzz opened this issue Jul 19, 2019 · 2 comments
Closed

使用vuex只能一个个的computed吗 #34

infyzz opened this issue Jul 19, 2019 · 2 comments

Comments

@infyzz
Copy link

infyzz commented Jul 19, 2019

使用vuex只能一个个的computed吗,能不能像vue2中的mapState那样直接展开

@SilentDepth
Copy link

mapState 是 Vuex 提供的功能,所以 computed 也应当是 Vuex 负责调用,vue-function-api 管不了了。不过你可以自己写个 hook 半自动化地实现类似效果。

@posva
Copy link
Member

posva commented Jul 31, 2019

Duplicate of #8

@posva posva closed this as completed Jul 31, 2019
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

3 participants