16 lines
349 B
JavaScript
16 lines
349 B
JavaScript
|
// 组装模块并导出 store 的地方
|
||
|
import Vue from 'vue'
|
||
|
import Vuex from 'vuex'
|
||
|
import moduleA from '@/store/modules/moduleA'
|
||
|
import moduleB from '@/store/modules/moduleB'
|
||
|
|
||
|
Vue.use(Vuex);//vue的插件机制
|
||
|
|
||
|
//Vuex.modules 模块选项
|
||
|
const store = new Vuex.Store({
|
||
|
modules: {
|
||
|
moduleA,
|
||
|
moduleB
|
||
|
}
|
||
|
})
|
||
|
export default store
|