1.8 版本
This commit is contained in:
23
src/store/modules/settings.js
Normal file
23
src/store/modules/settings.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import Config from '@/config'
|
||||
|
||||
const settings = {
|
||||
state: {
|
||||
showRightPanel: false,
|
||||
tagsView: Config.tagsView,
|
||||
fixedHeader: Config.fixedHeader,
|
||||
sidebarLogo: Config.sidebarLogo
|
||||
},
|
||||
mutations: {
|
||||
CHANGE_SETTING: (state, { key, value }) => {
|
||||
if (state.hasOwnProperty(key)) {
|
||||
state[key] = value
|
||||
}
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
changeSetting({ commit }, data) {
|
||||
commit('CHANGE_SETTING', data)
|
||||
}
|
||||
}
|
||||
}
|
||||
export default settings
|
||||
Reference in New Issue
Block a user