vue2的写法是这样
methods:{
...mapMutations("你的方法名"),
},
// 然后要用的时候直接方法名调用就好了
vue3 + ts + setup语法糖这样用
import store from '@/store/storeIndex'
// 直接在调用的地方这样使用
store.commit("你的方法名",{你的参数})
//举例
store.commit("test",{ test: test.value})
有其他的解决方法麻烦踹我一下😭