Revert "新增网页侧边栏颜色配置,新增网页主题色配置"
This commit is contained in:
@@ -5,7 +5,6 @@ import VuexPersistence from 'vuex-persist'
|
||||
import { user } from '@/store/module/user'
|
||||
import { router } from '@/store/module/router'
|
||||
import { dictionary } from '@/store/module/dictionary'
|
||||
import { app } from '@/store/module/app'
|
||||
Vue.use(Vuex)
|
||||
|
||||
const vuexLocal = new VuexPersistence({
|
||||
@@ -16,8 +15,7 @@ export const store = new Vuex.Store({
|
||||
modules: {
|
||||
user,
|
||||
router,
|
||||
dictionary,
|
||||
app
|
||||
dictionary
|
||||
},
|
||||
plugins: [vuexLocal.plugin]
|
||||
})
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
import variables from '@/style/element_visiable.scss'
|
||||
export const app = {
|
||||
namespaced: true,
|
||||
state: {
|
||||
theme: variables.colorPrimary,
|
||||
sideMode: 'dark'
|
||||
},
|
||||
mutations: {
|
||||
CHANGETHEME: (state, value) => {
|
||||
state.theme = value
|
||||
},
|
||||
CHANGESIDEMODE: (state) => {
|
||||
if (state.sideMode === 'dark') {
|
||||
state.sideMode = 'light'
|
||||
} else {
|
||||
state.sideMode = 'dark'
|
||||
}
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
changeTheme({ commit }, data) {
|
||||
commit('CHANGETHEME', data)
|
||||
},
|
||||
changeSideMode({ commit }) {
|
||||
commit('CHANGESIDEMODE')
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
getSIdeMode(state) {
|
||||
return state.sideMode
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user