Open
Description
Version
4.0.0-beta.4
import { createStore } from 'vuex'
import * as types from './mutation-type'
export default createStore({
modules: {
common: {
namespaced: true,
state: {
device: '',
},
mutation: {
[types.SET_DEVICE_LIST](state: any, device: string) {
state.device = device
},
},
actions: {
findDeviceList: findDeviceList({commit}, params) {
commit(types.SET_DEVICE_LIST, 'success')
}
},
}
},
})
output errpr:
[vuex] unknown local mutation type: SET_DEVICE_LIST, global type: common/SET_DEVICE_LIST
Steps to reproduce
when use vuex3.0 is ok, but vue4.0 use moduels is error, not to find commit path
What is expected?
how to vuex4.0 use modules the commit of mutation