yanghao 2 dní pred
rodič
commit
e3fc51e382

+ 7 - 2
src/layout/components/AppView.vue

@@ -2,6 +2,7 @@
 import { useTagsViewStore } from '@/store/modules/tagsView'
 import { useAppStore } from '@/store/modules/app'
 import { Footer } from '@/layout/components/Footer'
+import { getCurrentSource } from '@/utils/currentSource'
 
 defineOptions({ name: 'AppView' })
 
@@ -20,6 +21,7 @@ const getCaches = computed((): string[] => {
 })
 
 const tagsView = computed(() => appStore.getTagsView)
+const hideTopHeader = computed(() => getCurrentSource() === 'qhse')
 
 //region 无感刷新
 const routerAlive = ref(true)
@@ -36,10 +38,13 @@ provide('reload', reload)
 <template>
   <section
     :class="[
-      'p-[var(--app-content-padding)] w-full bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]',
+      'w-full bg-[var(--app-content-bg-color)] dark:bg-[var(--el-bg-color)]',
+      hideTopHeader ? 'px-[var(--app-content-padding)] pb-[var(--app-content-padding)] pt-0' : 'p-[var(--app-content-padding)]',
       {
+        '!min-h-[calc(100vh-var(--tags-view-height)-var(--app-footer-height))] pb-0':
+          footer && hideTopHeader,
         '!min-h-[calc(100vh-var(--top-tool-height)-var(--tags-view-height)-var(--app-footer-height))] pb-0':
-          footer
+          footer && !hideTopHeader
       }
     ]"
   >

+ 22 - 22
src/layout/components/useRenderLayout.tsx

@@ -75,7 +75,7 @@ export const useRenderLayout = () => {
               {
                 '!h-[calc(100%-var(--top-tool-height)-var(--tags-view-height))] mt-[calc(var(--top-tool-height)+var(--tags-view-height))]':
                   fixedHeader.value && !hideTopHeader.value,
-                '!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]':
+                '!h-[calc(100%-var(--tags-view-height))] mt-0':
                   fixedHeader.value && hideTopHeader.value
               }
             ]}
@@ -103,7 +103,7 @@ export const useRenderLayout = () => {
                   ]}
                 ></ToolHeader>
 
-                {tagsView.value ? (
+                {!hideTopHeader.value && tagsView.value ? (
                   <TagsView class="layout-border__top layout-border__bottom"></TagsView>
                 ) : undefined}
               </div>
@@ -150,17 +150,17 @@ export const useRenderLayout = () => {
           >
             <ElScrollbar
               v-loading={pageLoading.value}
-              class={[
-                `${prefixCls}-content-scrollbar`,
-                {
-                  '!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]':
-                    fixedHeader.value && tagsView.value && !hideTopHeader.value,
-                  '!h-[calc(100%)] mt-0':
-                    fixedHeader.value && hideTopHeader.value
-                }
-              ]}
+            class={[
+              `${prefixCls}-content-scrollbar`,
+              {
+                '!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]':
+                  fixedHeader.value && tagsView.value && !hideTopHeader.value,
+                '!h-[calc(100%)] mt-0':
+                  fixedHeader.value && hideTopHeader.value
+              }
+            ]}
             >
-              {tagsView.value ? (
+              {!hideTopHeader.value && tagsView.value ? (
                 <TagsView
                   class={[
                     'layout-border__bottom absolute',
@@ -219,7 +219,7 @@ export const useRenderLayout = () => {
               }
             ]}
           >
-            {tagsView.value ? (
+            {!hideTopHeader.value && tagsView.value ? (
               <TagsView
                 class={[
                   'layout-border__bottom layout-border__top relative',
@@ -277,16 +277,16 @@ export const useRenderLayout = () => {
           >
             <ElScrollbar
               v-loading={pageLoading.value}
-              class={[
-                `${prefixCls}-content-scrollbar`,
-                {
-                  '!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]':
-                    fixedHeader.value && tagsView.value && !hideTopHeader.value,
-                  '!h-full mt-0': hideTopHeader.value
-                }
-              ]}
+            class={[
+              `${prefixCls}-content-scrollbar`,
+              {
+                '!h-[calc(100%-var(--tags-view-height))] mt-[calc(var(--tags-view-height))]':
+                  fixedHeader.value && tagsView.value && !hideTopHeader.value,
+                '!h-full mt-0': hideTopHeader.value
+              }
+            ]}
             >
-              {tagsView.value ? (
+              {!hideTopHeader.value && tagsView.value ? (
                 <TagsView
                   class={[
                     'relative layout-border__bottom',