You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
475 B
25 lines
475 B
import Vue from 'vue'
|
|
import Vuex from 'vuex'
|
|
import VuexPersistence from 'vuex-persist'
|
|
import { user } from '~/store/module/user'
|
|
import { category } from '~/store/module/category'
|
|
|
|
Vue.use(Vuex)
|
|
|
|
const vuexLocal = new VuexPersistence({
|
|
storage: window.localStorage,
|
|
modules: ['user', 'category'],
|
|
key: 'moredoc',
|
|
})
|
|
|
|
const store = () =>
|
|
new Vuex.Store({
|
|
modules: {
|
|
user,
|
|
category,
|
|
},
|
|
plugins: [vuexLocal.plugin],
|
|
})
|
|
|
|
export default store
|