今天使用Vuex的时候突然报错了,康康官网是怎么搞得:
const store = new Vuex.Store({
state: {
count: 0
},
mutations: {
increment (state) {
state.count++
}
}
})
再康康我的:
const store = new Vuex.store({
state: {
count: 0
},
mutations: {
increment (state) {
state.count++
}
}
})
将new Vuex.store
的store的s大写,这真是疏忽