index.js 353 字节
Newer Older
DCloud_JSON's avatar
DCloud_JSON 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import user from '@/store/modules/user.js'

// #ifndef VUE3
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
	modules: {
		user
	},
	strict: true
})
// #endif

// #ifdef VUE3
import {createStore} from 'vuex'
雪洛's avatar
雪洛 已提交
17 18 19 20
const store = createStore({
	modules: {
		user
	}
DCloud_JSON's avatar
DCloud_JSON 已提交
21 22 23
})
// #endif

雪洛's avatar
雪洛 已提交
24
export default store