From 2b263e7da46d3884fb51c5544fa853fcd612cbe1 Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Thu, 13 Jul 2023 18:37:51 +0800 Subject: [PATCH] =?UTF-8?q?=20[issues/608]=20dark=20=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E5=BA=95=E9=83=A8=20footer=20=E6=96=87=E5=AD=97=20hov?= =?UTF-8?q?er=20=E6=A0=B7=E5=BC=8F=E5=AF=BC=E8=87=B4=E6=96=87=E5=AD=97?= =?UTF-8?q?=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/default/footer/index.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/layouts/default/footer/index.vue b/src/layouts/default/footer/index.vue index adca7d5..a7e0d93 100644 --- a/src/layouts/default/footer/index.vue +++ b/src/layouts/default/footer/index.vue @@ -25,6 +25,7 @@ import { useRouter } from 'vue-router'; import { useDesign } from '/@/hooks/web/useDesign'; import { useLayoutHeight } from '../content/useContentViewHeight'; + import { ThemeEnum } from '/@/enums/appEnum'; export default defineComponent({ name: 'LayoutFooter', @@ -37,6 +38,9 @@ const footerRef = ref(null); const { setFooterHeight } = useLayoutHeight(); + //当前主题 + const { getDarkMode } = useRootSetting(); + const isDark = computed(() => getDarkMode.value === ThemeEnum.DARK); const getShowLayoutFooter = computed(() => { if (unref(getShowFooter)) { @@ -47,7 +51,10 @@ } return unref(getShowFooter) && !unref(currentRoute).meta?.hiddenFooter; }); - + //鼠标移入的颜色设置 + const hoverColor = computed(() => { + return unref(isDark) ? 'rgba(255, 255, 255, 1)' : 'rgba(0, 0, 0, 0.85)'; + }); return { getShowLayoutFooter, prefixCls, @@ -57,6 +64,7 @@ SITE_URL, openWindow, footerRef, + hoverColor, }; }, }); @@ -65,9 +73,9 @@ @prefix-cls: ~'@{namespace}-layout-footer'; @normal-color: rgba(0, 0, 0, 0.45); - - @hover-color: rgba(0, 0, 0, 0.85); - + // update-begin-author:liusq date:2023-7-12 for: [issues/608] dark 模式下底部 footer 文字 hover 样式导致文字消失 + @hover-color: v-bind(hoverColor); + // update-end-author:liusq date:2023-7-12 for: [issues/608] dark 模式下底部 footer 文字 hover 样式导致文字消失 .@{prefix-cls} { color: @normal-color; text-align: center;