From 4e56f30381f2775aa62f3cfbe16e5064ab0c0726 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期三, 09 十二月 2020 16:49:24 +0800 Subject: [PATCH] 修改 生成器controller模板缺导包 与 index页面兼容性 Merge pull request !2 from dragonwzj/master --- ruoyi-ui/src/store/modules/settings.js | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/ruoyi-ui/src/store/modules/settings.js b/ruoyi-ui/src/store/modules/settings.js new file mode 100644 index 0000000..a1152a9 --- /dev/null +++ b/ruoyi-ui/src/store/modules/settings.js @@ -0,0 +1,34 @@ +import variables from '@/assets/styles/element-variables.scss' +import defaultSettings from '@/settings' + +const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings + +const state = { + theme: variables.theme, + showSettings: showSettings, + tagsView: tagsView, + fixedHeader: fixedHeader, + sidebarLogo: sidebarLogo +} + +const mutations = { + CHANGE_SETTING: (state, { key, value }) => { + if (state.hasOwnProperty(key)) { + state[key] = value + } + } +} + +const actions = { + changeSetting({ commit }, data) { + commit('CHANGE_SETTING', data) + } +} + +export default { + namespaced: true, + state, + mutations, + actions +} + -- Gitblit v1.9.3