diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue
index b97ef46..e7901fd 100644
--- a/src/components/setting/Setting.vue
+++ b/src/components/setting/Setting.vue
@@ -49,6 +49,10 @@
{{$t('other.multiPages')}}
+
+ {{$t('other.hideSetting')}}
+
+
@@ -107,7 +111,7 @@ export default {
themeColorIndex() {
return [this.colors.indexOf(this.themeColor)]
},
- ...mapState('setting', ['theme', 'themeColor', 'layout', 'animates', 'multiPage', 'weekMode', 'fixedHeader', 'fixedSideBar'])
+ ...mapState('setting', ['theme', 'themeColor', 'layout', 'animates', 'multiPage', 'weekMode', 'fixedHeader', 'fixedSideBar', 'hideSetting'])
},
methods: {
onColorChange (values, colors) {
@@ -129,7 +133,8 @@ export default {
}
this.setAnimate({name: this.animate, direction: this.direction})
},
- ...mapMutations('setting', ['setTheme', 'setThemeColor', 'setLayout', 'setMultiPage', 'setWeekMode', 'setFixedSideBar', 'setFixedHeader', 'setAnimate'])
+ ...mapMutations('setting', ['setTheme', 'setThemeColor', 'setLayout', 'setMultiPage', 'setWeekMode',
+ 'setFixedSideBar', 'setFixedHeader', 'setAnimate', 'setHideSetting'])
}
}
diff --git a/src/components/setting/i18n.js b/src/components/setting/i18n.js
index 7480645..31297f9 100644
--- a/src/components/setting/i18n.js
+++ b/src/components/setting/i18n.js
@@ -23,7 +23,8 @@ module.exports = {
other: {
title: '其他设置',
weekMode: '色弱模式',
- multiPages: '多页签模式'
+ multiPages: '多页签模式',
+ hideSetting: '隐藏设置抽屉'
},
animate: {
title: '页面切换动画',
@@ -55,7 +56,8 @@ module.exports = {
other: {
title: '其他設置',
weekMode: '色弱模式',
- multiPages: '多頁簽模式'
+ multiPages: '多頁簽模式',
+ hideSetting: '隱藏設置抽屜'
},
animate: {
title: '頁面切換動畫',
@@ -87,7 +89,8 @@ module.exports = {
other: {
title: 'Other Setting',
weekMode: 'Week Mode',
- multiPages: 'Multi Pages'
+ multiPages: 'Multi Pages',
+ hideSetting: 'Hide Setting Drawer'
},
animate: {
title: 'Page Toggle Animation',
diff --git a/src/config/default/setting.js b/src/config/default/setting.js
index fdd3e97..895400d 100644
--- a/src/config/default/setting.js
+++ b/src/config/default/setting.js
@@ -8,6 +8,7 @@ module.exports = {
fixedSideBar: true, //固定侧边栏,true:固定,false:不固定
weekMode: false, //色弱模式,true:开启,false:不开启
multiPage: false, //多页签模式,true:开启,false:不开启
+ hideSetting: false, //隐藏设置抽屉,true:隐藏,false:不隐藏
systemName: 'Vue Antd Admin', //系统名称
copyright: '2018 ICZER 工作室出品', //copyright
animate: { //动画设置
diff --git a/src/layouts/AdminLayout.vue b/src/layouts/AdminLayout.vue
index 29a2b6a..356deee 100644
--- a/src/layouts/AdminLayout.vue
+++ b/src/layouts/AdminLayout.vue
@@ -4,7 +4,7 @@
-
+
@@ -55,7 +55,7 @@ export default {
}
},
computed: {
- ...mapState('setting', ['isMobile', 'theme', 'layout', 'footerLinks', 'copyright', 'fixedHeader', 'fixedSideBar']),
+ ...mapState('setting', ['isMobile', 'theme', 'layout', 'footerLinks', 'copyright', 'fixedHeader', 'fixedSideBar', 'hideSetting']),
sideMenuWidth() {
return this.collapsed ? '80px' : '256px'
},
diff --git a/src/store/modules/setting.js b/src/store/modules/setting.js
index af760e8..d76466b 100644
--- a/src/store/modules/setting.js
+++ b/src/store/modules/setting.js
@@ -40,6 +40,9 @@ export default {
},
setRoutesI18n(state, i18n) {
state.routesI18n = i18n
+ },
+ setHideSetting(state, hideSetting) {
+ state.hideSetting = hideSetting
}
}
}