How to call the mutations of another module in the action of one module by vuex in nuxt

suppose that two modules an and b are defined in vuex, and how can action in SET_USER,a be called if there is a mutations method in b?
I try to directly

store.commit("SET_USER", user);

but the prompt cannot find this mutations,. It seems that the commit in actions adds the prefix of "current module name /" by default?
I want to use store, more freely and how can I introduce store in my custom helper library?

Mar.12,2021

solved, instead of exposing state, action, mutations directly like nuxt documents,

const store = () => new Vuex.Store({
  state: {},
  modules,
});

the store object can be obtained by introducing store/index.js into the custom helper library and calling this method.

Menu