From 9aac65ff328fde857c76726da0677021cc5980ca Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Mon, 12 Apr 2021 09:54:08 +0800
Subject: [PATCH] 新增菜单导航显示风格TopNav(false为左侧导航菜单,true为顶部导航菜单)
---
ruoyi-ui/src/layout/components/Settings/index.vue | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/ruoyi-ui/src/layout/components/Settings/index.vue b/ruoyi-ui/src/layout/components/Settings/index.vue
index 7e495b7..7e36d48 100644
--- a/ruoyi-ui/src/layout/components/Settings/index.vue
+++ b/ruoyi-ui/src/layout/components/Settings/index.vue
@@ -41,6 +41,11 @@
<el-divider/>
<h3 class="drawer-title">系统布局配置</h3>
+
+ <div class="drawer-item">
+ <span>开启 TopNav</span>
+ <el-switch v-model="topNav" class="drawer-switch" />
+ </div>
<div class="drawer-item">
<span>开启 Tags-Views</span>
@@ -87,6 +92,20 @@
})
}
},
+ topNav: {
+ get() {
+ return this.$store.state.settings.topNav
+ },
+ set(val) {
+ this.$store.dispatch('settings/changeSetting', {
+ key: 'topNav',
+ value: val
+ })
+ if (!val) {
+ this.$store.commit("SET_SIDEBAR_ROUTERS", this.$store.state.permission.defaultRoutes);
+ }
+ }
+ },
tagsView: {
get() {
return this.$store.state.settings.tagsView
--
Gitblit v1.9.2