From aa3f824d64c083ea2ed62cac208e40e06c9c31ab Mon Sep 17 00:00:00 2001 From: Soybean <49704545+honghuangdc@users.noreply.github.com> Date: Sat, 3 Dec 2022 13:40:58 +0800 Subject: [PATCH] Merge pull request #160 from zuihou/main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增2个功能 --- src/layouts/BasicLayout/index.vue | 1 + .../TabDetail/components/ContextMenu.vue | 4 +++- .../GlobalTab/components/TabDetail/index.vue | 14 ++++++++------ .../SettingDrawer/components/PageFunc/index.vue | 3 +++ src/settings/theme.json | 3 ++- src/settings/theme.ts | 3 ++- src/store/modules/theme/index.ts | 4 ++++ src/typings/route.d.ts | 2 ++ src/typings/system.d.ts | 2 ++ 9 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/layouts/BasicLayout/index.vue b/src/layouts/BasicLayout/index.vue index 807a7bff..4adb561a 100644 --- a/src/layouts/BasicLayout/index.vue +++ b/src/layouts/BasicLayout/index.vue @@ -11,6 +11,7 @@ :sider-collapsed-width="siderCollapsedWidth" :sider-collapse="app.siderCollapse" :fixed-footer="theme.footer.fixed" + :footer-visible="theme.footer.visible" @update:sider-collapse="app.setSiderCollapse" > diff --git a/src/settings/theme.json b/src/settings/theme.json index aa1dd740..a0299b55 100644 --- a/src/settings/theme.json +++ b/src/settings/theme.json @@ -110,7 +110,8 @@ }, "footer": { "fixed": false, - "height": 48 + "height": 48, + "visible": true }, "page": { "animate": true, diff --git a/src/settings/theme.ts b/src/settings/theme.ts index 3475d260..d354dceb 100644 --- a/src/settings/theme.ts +++ b/src/settings/theme.ts @@ -88,7 +88,8 @@ const defaultThemeSetting: Theme.Setting = { }, footer: { fixed: false, - height: 48 + height: 48, + visible: true }, page: { animate: true, diff --git a/src/store/modules/theme/index.ts b/src/store/modules/theme/index.ts index c693790f..01118da8 100644 --- a/src/store/modules/theme/index.ts +++ b/src/store/modules/theme/index.ts @@ -149,6 +149,10 @@ export const useThemeStore = defineStore('theme-store', { setFooterHeight(height: number) { this.footer.height = height; }, + /** 设置底部是否显示 */ + setFooterVisible(isVisible: boolean) { + this.footer.visible = isVisible; + }, /** 设置切换页面时是否过渡动画 */ setPageIsAnimate(animate: boolean) { this.page.animate = animate; diff --git a/src/typings/route.d.ts b/src/typings/route.d.ts index cfad97b8..671ab219 100644 --- a/src/typings/route.d.ts +++ b/src/typings/route.d.ts @@ -60,6 +60,8 @@ declare namespace AuthRoute { activeMenu?: RouteKey; /** 表示是否是多级路由的中间级路由(用于转换路由数据时筛选多级路由的标识,定义路由时不用填写) */ multi?: boolean; + /** 是否固定在tab卡不可关闭 */ + affix?: boolean; } type Route = K extends AllRouteKey diff --git a/src/typings/system.d.ts b/src/typings/system.d.ts index 301c2db4..761af358 100644 --- a/src/typings/system.d.ts +++ b/src/typings/system.d.ts @@ -236,6 +236,8 @@ declare namespace Theme { fixed: boolean; /** 底部高度 */ height: number; + /* 底部是否可见 */ + visible: boolean; } /** 页面样式 */