const _toggleModule = {
state: {
toggleStatus: 0
},
mutations: {
_toggle(state, index) {
state.toggleStatus = index
}
},
actions: {
layoutToggle({commit}, index) {
alert(123)
commit('_toggle', index)
}
},
getter: {
toggleStatus(state) {
return state.toggleStatus
}
}
}
export default new Vuex.Store({
modules: {
toggleModule: _toggleModule
}
})
----------------------------------------------------
methods: {
...mapActions([
'????????'
])
}
生来自由
相关分类