-
Notifications
You must be signed in to change notification settings - Fork 253
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
建议 #2
Comments
@xdwxls 感谢关注,相互学习咯 |
有一个疑问?vuex的state可以用 store.state 可以直接修改,为啥还要commit到mutations ? 你怎么看,大神,我感觉好像就是为了多个组件达到复用 |
@xdwxls 你不能直接改变 store 中的状态。改变 store 中的状态的唯一途径就是显式地提交(commit) mutations。这样使得我们可以方便地跟踪每一个状态的变化,从而让我们能够实现一些工具帮助我们更好地了解我们的应用。请看官网http://vuex.vuejs.org/zh-cn/intro.html |
本地安装 怎么弄? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
大神,入坑vue,就是学习你的项目提升的。很感谢
建议,下次有个小的项目 针对多页入口的
The text was updated successfully, but these errors were encountered: