Open LiYanyan-a opened 4 months ago
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 }) {
},
}, }
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 }) {
}, }