摘要: 一、vuex中mutation和action的详细区别 const store = new Vuex.Store({ state: { count: 0 }, mutations: { increment (state) { state.count++ } }, actions: { increme 阅读全文
posted @ 2020-05-27 07:10 Frank_520 阅读(2754) 评论(0) 推荐(0) 编辑
摘要: 我们的项目非常简单,当点击+1按钮的时候,count 加1,点击-1按钮的时候,count 减1. 1, mutation The only way to actually change state in a Vuex store is by committing a mutation, 在vue 阅读全文
posted @ 2020-05-27 07:04 Frank_520 阅读(369) 评论(0) 推荐(0) 编辑