From 397f4b4ab86fa92fed17ff659b3354942807bbb5 Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Wed, 1 Jul 2020 17:30:20 +0800 Subject: [PATCH] chore: optimize the realization of theme color :star2: --- src/components/setting/Setting.vue | 2 +- src/config/default/index.js | 4 ++++ src/config/default/setting.js | 21 +++++++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/config/default/index.js create mode 100644 src/config/default/setting.js diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue index 9cbe4f8..ee15947 100644 --- a/src/components/setting/Setting.vue +++ b/src/components/setting/Setting.vue @@ -111,7 +111,7 @@ export default { methods: { onColorChange (values, colors) { if (colors.length > 0) { - let closeMessage = this.$message.info(`您选择了主题色 ${colors}, 正在切换...`) + let closeMessage = this.$message.loading(`您选择了主题色 ${colors}, 正在切换...`) let _this = this themeUtil.changeThemeColor(colors[0]).then(() => { _this.setThemeColor(colors[0]) diff --git a/src/config/default/index.js b/src/config/default/index.js new file mode 100644 index 0000000..1fbce98 --- /dev/null +++ b/src/config/default/index.js @@ -0,0 +1,4 @@ +const animates = require('./animates') +const setting = require('./setting') + +module.exports = {setting, animates} diff --git a/src/config/default/setting.js b/src/config/default/setting.js new file mode 100644 index 0000000..bee7bb5 --- /dev/null +++ b/src/config/default/setting.js @@ -0,0 +1,21 @@ +module.exports = { + lang: 'CN', + themeColor: '#1890ff', + theme: 'dark', + layout: 'side', + fixedHeader: false, + fixedSideBar: true, + weekMode: false, + multiPage: false, + systemName: 'Vue Antd Admin', + copyright: '2018 ICZER 工作室出品', + animate: { + name: 'bounce', + direction: 'left' + }, + footerLinks: [ + {link: 'https://pro.ant.design', name: 'Pro首页'}, + {link: 'https://github.com/iczer/vue-antd-admin', icon: 'github'}, + {link: 'https://ant.design', name: 'Ant Design'} + ], +}