摘要: const store = new Vuex.Store({ state: { count: 0 }, mutations: { increment (state) { state.count++ } }, actions: { increment (context) { context.commi 阅读全文
posted @ 2019-05-04 22:21 expworld 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2019-05-04 21:43 expworld 阅读(85) 评论(0) 推荐(0) 编辑
摘要: https://www.jianshu.com/p/33e5fb3f3a86 https://segmentfault.com/a/1190000015782272 写在前面: 1、创建一个store.js ES6【解构赋值】知识点 在main.js引入 store 应用与组件内: 推荐使用: 大型 阅读全文
posted @ 2019-05-04 20:06 expworld 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1、先看效果:无需import,直接写组件标签,方便! 第一步:先添加一个组件Login.vue 第二步:在Login.vue同目录下添加一个index.js 第三步:在main.js文件下使用即可 阅读全文
posted @ 2019-05-04 02:28 expworld 阅读(510) 评论(0) 推荐(0) 编辑