From e26fecfee88cbfd6b3bb90b91f9336d6eaec71c8 Mon Sep 17 00:00:00 2001
From: ibuler <ibuler@qq.com>
Date: Tue, 18 Mar 2025 11:22:21 +0800
Subject: [PATCH] perf: update detail tab page loading

---
 src/layout/components/GenericDetailPage/index.vue | 5 +++--
 src/layout/components/TabPage/index.vue           | 4 ++--
 src/styles/index.scss                             | 4 ++++
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/layout/components/GenericDetailPage/index.vue b/src/layout/components/GenericDetailPage/index.vue
index 6f63d3c63..e4b1e6ea2 100644
--- a/src/layout/components/GenericDetailPage/index.vue
+++ b/src/layout/components/GenericDetailPage/index.vue
@@ -1,6 +1,5 @@
 <template>
   <TabPage
-    v-if="!loading"
     :active-menu.sync="iActiveMenu"
     :submenu="iSubmenu"
     :title="iTitle"
@@ -12,7 +11,9 @@
         <ActionsGroup slot="headingRightSide" :actions="pageActions" class="header-buttons" />
       </span>
     </template>
-    <slot />
+    <div v-if="!loading">
+      <slot />
+    </div>
   </TabPage>
 </template>
 
diff --git a/src/layout/components/TabPage/index.vue b/src/layout/components/TabPage/index.vue
index a99c833d0..978b1447e 100644
--- a/src/layout/components/TabPage/index.vue
+++ b/src/layout/components/TabPage/index.vue
@@ -1,5 +1,5 @@
 <template>
-  <Page v-if="!loading" :title="title" class="tab-page" v-bind="$attrs">
+  <Page :title="title" class="tab-page" v-bind="$attrs">
     <template #headingRightSide>
       <slot name="headingRightSide" />
     </template>
@@ -45,7 +45,7 @@
         <el-alert v-if="helpMessage" type="success">
           <span v-sanitize="helpMessage" class="announcement-main" />
         </el-alert>
-        <transition appear mode="out-in" name="fade-transform">
+        <transition v-if="!loading" appear mode="out-in" name="fade-transform">
           <slot>
             <keep-alive>
               <component :is="computeActiveComponent" />
diff --git a/src/styles/index.scss b/src/styles/index.scss
index 20e8d4b23..cba571866 100644
--- a/src/styles/index.scss
+++ b/src/styles/index.scss
@@ -702,3 +702,7 @@ li.rmenu i.fa {
 div.el-loading-parent--relative {
   min-height: 150px;
 }
+
+.el-drawer__header .drawer-title {
+  color: var(--color-text-primary);
+}