From 439e3b0f076280311b7cd4251a95820730242780 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期三, 07 八月 2024 10:43:33 +0800
Subject: [PATCH] 一些更新

---
 src/layouts/default/footer/index.vue |   66 +++++++++++++--------------------
 1 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/src/layouts/default/footer/index.vue b/src/layouts/default/footer/index.vue
index 62e3c5e..689f795 100644
--- a/src/layouts/default/footer/index.vue
+++ b/src/layouts/default/footer/index.vue
@@ -1,5 +1,5 @@
 <template>
-  <Footer :class="prefixCls" v-if="getShowLayoutFooter" ref="footerRef">
+  <Layout.Footer :class="prefixCls" v-if="getShowLayoutFooter" ref="footerRef">
     <div :class="`${prefixCls}__links`">
       <a @click="openWindow(SITE_URL)">{{ t('layout.footer.onlinePreview') }}</a>
 
@@ -8,57 +8,41 @@
       <a @click="openWindow(DOC_URL)">{{ t('layout.footer.onlineDocument') }}</a>
     </div>
     <div>Copyright &copy;2020 Vben Admin</div>
-  </Footer>
+  </Layout.Footer>
 </template>
-
-<script lang="ts">
-  import { computed, defineComponent, unref, ref } from 'vue';
+<script lang="ts" setup>
+  import { computed, unref, ref } from 'vue';
   import { Layout } from 'ant-design-vue';
 
   import { GithubFilled } from '@ant-design/icons-vue';
 
-  import { DOC_URL, GITHUB_URL, SITE_URL } from '/@/settings/siteSetting';
-  import { openWindow } from '/@/utils';
+  import { DOC_URL, GITHUB_URL, SITE_URL } from '@/settings/siteSetting';
+  import { openWindow } from '@/utils';
 
-  import { useI18n } from '/@/hooks/web/useI18n';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
+  import { useI18n } from '@/hooks/web/useI18n';
+  import { useRootSetting } from '@/hooks/setting/useRootSetting';
   import { useRouter } from 'vue-router';
-  import { useDesign } from '/@/hooks/web/useDesign';
+  import { useDesign } from '@/hooks/web/useDesign';
   import { useLayoutHeight } from '../content/useContentViewHeight';
 
-  export default defineComponent({
-    name: 'LayoutFooter',
-    components: { Footer: Layout.Footer, GithubFilled },
-    setup() {
-      const { t } = useI18n();
-      const { getShowFooter } = useRootSetting();
-      const { currentRoute } = useRouter();
-      const { prefixCls } = useDesign('layout-footer');
+  defineOptions({ name: 'LayoutFooter' });
 
-      const footerRef = ref<ComponentRef>(null);
-      const { setFooterHeight } = useLayoutHeight();
+  const { t } = useI18n();
+  const { getShowFooter } = useRootSetting();
+  const { currentRoute } = useRouter();
+  const { prefixCls } = useDesign('layout-footer');
 
-      const getShowLayoutFooter = computed(() => {
-        if (unref(getShowFooter)) {
-          const footerEl = unref(footerRef)?.$el;
-          setFooterHeight(footerEl?.offsetHeight || 0);
-        } else {
-          setFooterHeight(0);
-        }
-        return unref(getShowFooter) && !unref(currentRoute).meta?.hiddenFooter;
-      });
+  const footerRef = ref<ComponentRef>(null);
+  const { setFooterHeight } = useLayoutHeight();
 
-      return {
-        getShowLayoutFooter,
-        prefixCls,
-        t,
-        DOC_URL,
-        GITHUB_URL,
-        SITE_URL,
-        openWindow,
-        footerRef,
-      };
-    },
+  const getShowLayoutFooter = computed(() => {
+    if (unref(getShowFooter)) {
+      const footerEl = unref(footerRef)?.$el;
+      setFooterHeight(footerEl?.offsetHeight || 0);
+    } else {
+      setFooterHeight(0);
+    }
+    return unref(getShowFooter) && !unref(currentRoute).meta?.hiddenFooter;
   });
 </script>
 <style lang="less" scoped>
@@ -69,6 +53,8 @@
   @hover-color: rgba(0, 0, 0, 0.85);
 
   .@{prefix-cls} {
+    // 椤佃剼鍥哄畾楂樺害
+    height: 75px;
     color: @normal-color;
     text-align: center;
 

--
Gitblit v1.9.3