From 7a10b95baa89fab63f0d029a0e371c85c5b9346b Mon Sep 17 00:00:00 2001 From: Pan Date: Mon, 25 Mar 2019 14:42:08 +0800 Subject: [PATCH] add settings --- src/layout/components/Settings/index.vue | 18 +++++++++++++++++- src/layout/components/Sidebar/index.vue | 5 ++++- src/settings.js | 6 ++++++ src/store/modules/settings.js | 5 +++-- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/src/layout/components/Settings/index.vue b/src/layout/components/Settings/index.vue index 96e8bb5c..912fb71a 100644 --- a/src/layout/components/Settings/index.vue +++ b/src/layout/components/Settings/index.vue @@ -20,6 +20,11 @@ +
+ 侧边栏 Logo + +
+ @@ -31,7 +36,7 @@ export default { components: { ThemePicker }, data() { return { - sidebarLogo: true + } }, computed: { @@ -56,6 +61,17 @@ export default { value: val }) } + }, + sidebarLogo: { + get() { + return this.$store.state.settings.sidebarLogo + }, + set(val) { + this.$store.dispatch('settings/changeSetting', { + key: 'sidebarLogo', + value: val + }) + } } } } diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index ff19dcd0..93f5e5af 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -1,6 +1,6 @@