Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用mudule,在一个模块中commit另一个模块的mutations报unknown local mutation type #2249

Open
LiYanyan-a opened this issue Jul 15, 2024 · 0 comments

Comments

@LiYanyan-a
Copy link

createStore代码:
import getters from './getters'
import modules from './modules'
import { createStore } from 'vuex'
const store = createStore({
getters,
modules,
})

export function setupStore(app) {
app.use(store);
}
被报找不到mutation type的模块代码
import * as R from 'ramda'
import http from '@/utils/http'

export default {
namespaced: true,
state: {},
mutations: {
SET_DATA (state, { name, data }) {
state[name] = data
},
DEL_DATA (state, { name }) {
delete state[name]
},
},
actions: {
async get ({ commit, rootGetters }, { category, onFinally }) {

},

},
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant