chore: optimize the code of system layout; 🌟

This commit is contained in:
chenghongxing
2020-07-23 12:40:36 +08:00
parent fd3c79493f
commit b78cf5c6e1
9 changed files with 233 additions and 224 deletions

View File

@@ -1,19 +1,13 @@
import Vue from 'vue'
import Vuex from 'vuex'
import account from './modules/account'
import setting from './modules/setting'
import modules from './modules'
import PouchDB from 'pouchdb'
const db = new PouchDB('adminDb')
Vue.use(Vuex)
const store = new Vuex.Store({
modules: {
account,
setting
}
})
const store = new Vuex.Store({modules})
// 读取用户信息
db.get('currUser')
.then(doc => store.commit('account/setUser', doc.user))

View File

@@ -0,0 +1,4 @@
import account from './account'
import setting from './setting'
export default {account, setting}