From 5a2a0c09b629410082e850bde2d3b6504f5a772e Mon Sep 17 00:00:00 2001 From: Ricky <hk_ricky@163.com> Date: 星期一, 12 四月 2021 13:26:54 +0800 Subject: [PATCH] 优化主子表代码生成 --- 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