From 9072bc93d7f562a298a975e5bd68930704d43aff Mon Sep 17 00:00:00 2001
From: iczer <1126263215@qq.com>
Date: Sun, 21 Jun 2020 17:11:21 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=9B=BA=E5=AE=9A?=
=?UTF-8?q?=20Sider/=E4=BE=A7=E8=BE=B9=E6=A0=8F=20=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/index.html | 2 +-
src/components/setting/Setting.vue | 7 +++++--
src/config/index.js | 1 +
src/layouts/GlobalLayout.vue | 31 +++++++++---------------------
src/store/modules/setting.js | 3 +++
src/theme/default/style.less | 19 ++++++++++++++++++
6 files changed, 38 insertions(+), 25 deletions(-)
diff --git a/public/index.html b/public/index.html
index 4123528..d36fdea 100644
--- a/public/index.html
+++ b/public/index.html
@@ -7,7 +7,7 @@
<%= htmlWebpackPlugin.options.title %>
-
+
diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue
index d4e4eea..b5d625c 100644
--- a/src/components/setting/Setting.vue
+++ b/src/components/setting/Setting.vue
@@ -33,7 +33,7 @@
固定Siderbar
-
+
@@ -114,7 +114,7 @@ export default {
directions() {
return this.animates.find(item => item.name == this.animate).directions
},
- ...mapState('setting', ['animates', 'multiPage', 'weekMode', 'fixedHeader'])
+ ...mapState('setting', ['animates', 'multiPage', 'weekMode', 'fixedHeader', 'fixedSider'])
},
methods: {
onColorChange (values, colors) {
@@ -156,6 +156,9 @@ export default {
},
setFixedHeader(checked) {
this.$store.commit('setting/setFixedHeader', checked)
+ },
+ setFixedSider(checked) {
+ this.$store.commit('setting/setFixedSider', checked)
}
}
}
diff --git a/src/config/index.js b/src/config/index.js
index 7de7a98..3404910 100644
--- a/src/config/index.js
+++ b/src/config/index.js
@@ -4,6 +4,7 @@ module.exports = {
theme: 'dark',
layout: 'side',
fixedHeader: false,
+ fixedSider: true,
weekMode: false,
multiPage: false,
systemName: 'Vue Antd Admin',
diff --git a/src/layouts/GlobalLayout.vue b/src/layouts/GlobalLayout.vue
index ceda357..b805765 100644
--- a/src/layouts/GlobalLayout.vue
+++ b/src/layouts/GlobalLayout.vue
@@ -1,5 +1,5 @@
-
+
@@ -10,7 +10,7 @@
-
+
@@ -54,7 +54,7 @@ export default {
}
},
computed: {
- ...mapState('setting', ['isMobile', 'theme', 'layout', 'footerLinks', 'copyright', 'fixedHeader']),
+ ...mapState('setting', ['isMobile', 'theme', 'layout', 'footerLinks', 'copyright', 'fixedHeader', 'fixedSider']),
sideMenuWidth() {
return this.collapsed ? '80px' : '256px'
},
@@ -87,26 +87,13 @@ export default {