摘要:
不同于mutations,actions可以处理异步操作 index.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { name: 'furon 阅读全文
posted @ 2021-07-14 19:56
thomas_blog
阅读(582)
评论(0)
推荐(0)
摘要:
<p>square: {{$store.getters.squareCount}}</p> index.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ stat 阅读全文
posted @ 2021-07-14 19:03
thomas_blog
阅读(39)
评论(0)
推荐(0)
摘要:
index.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { count: 100 }, mutations: { countAdd(state 阅读全文
posted @ 2021-07-14 11:38
thomas_blog
阅读(83)
评论(0)
推荐(0)
摘要:
下载源码编译 谷歌浏览器加载 使用 阅读全文
posted @ 2021-07-14 11:18
thomas_blog
阅读(72)
评论(0)
推荐(0)
摘要:
index.js import Vue from 'vue' import Vuex from 'vuex' Vue.use(Vuex) const store = new Vuex.Store({ state: { count: 100 }, mutations: { }, actions: { 阅读全文
posted @ 2021-07-14 10:28
thomas_blog
阅读(35)
评论(0)
推荐(0)

浙公网安备 33010602011771号