This commit is contained in:
曹辉 2023-03-15 10:36:04 +08:00
parent 49ca10e130
commit b76db3bca0

View File

@ -7,7 +7,6 @@ Vue.use(Vuex)
const store = new Vuex.Store({ const store = new Vuex.Store({
state: { state: {
//公共的变量这里的变量不能随便修改只能通过触发mutations的方法才能改变 //公共的变量这里的变量不能随便修改只能通过触发mutations的方法才能改变
name: '111',
}, },
mutations: { mutations: {
//相当于同步的操作 //相当于同步的操作
@ -35,7 +34,6 @@ const store = new Vuex.Store({
success(res) {}, success(res) {},
fail(err) {}, fail(err) {},
complete(scc) { complete(scc) {
console.log(scc)
} }
}) })
} }