How vuex module commit Global state

it seems that the vuex document does not have a commit global state, and the moutaions parameter only the global state, getter has rootstate,. So how do I commit the global state?

Mar.23,2021

can't you introduce the global js into the module?


Yes, in context

let GETLIST = 'GETLIST';
export default{
    namespaced: true,
    mutations: {
        [GETLIST](state, { context, param }){
            console.log(context.rootState)
        }
    },
    actions: {
        OPERATION(context, param){
            context.commit([GETLIST], { context, param })
        }
    }
}
Menu