From d064f6285a6d1616d7606f1390d5f01819b258bb Mon Sep 17 00:00:00 2001 From: zuihou <244387066@qq.com> Date: Fri, 2 Dec 2022 16:47:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20setting=20=E9=A1=B5=E9=9D=A2=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=20=E6=98=AF=E5=90=A6=E6=98=BE=E7=A4=BAfooter=E7=9A=84?= =?UTF-8?q?=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/BasicLayout/index.vue | 1 + .../common/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/system.d.ts | 2 ++ 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/layouts/BasicLayout/index.vue b/src/layouts/BasicLayout/index.vue index 807a7bff7..4adb561aa 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 aa1dd7408..a0299b55c 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 3475d2600..d354dceb4 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 c693790f8..01118da8f 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/system.d.ts b/src/typings/system.d.ts index 301c2db47..761af358b 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; } /** 页面样式 */