From d788fd08677fd56156b03ae871cfbaab0187ce4a Mon Sep 17 00:00:00 2001
From: rookie4show <rookie4show@gmail.com>
Date: Mon, 17 Mar 2025 00:08:29 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=88=AA=E5=9B=BE=E5=AE=BD?=
 =?UTF-8?q?=E5=BA=A6=E5=92=8C=E6=96=B0=E5=A2=9E=E6=96=87=E4=BB=B6=E9=97=AE?=
 =?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/App.vue         | 22 +++++++++++++++++++++-
 src/stores/files.ts |  2 +-
 2 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/src/App.vue b/src/App.vue
index f770b26..a8b7b97 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -87,7 +87,24 @@ const handleTabsEdit = (
     filesStore.closeTab(targetName);
   } else if (action === 'add') {
     const newFileName = `File ${filesStore.fileList.length + 1}`;
-    filesStore.addFile({ label: newFileName, name: newFileName });
+
+    filesStore.addFile({
+      label: newFileName,
+      name: newFileName,
+      visible: true,
+      groups:[
+        {
+          shortDescription: '',
+          groupInfo: [{}, {}, {}, {}, {}],
+          details: ''
+        },
+        {
+          shortDescription: '',
+          groupInfo: [{}, {}, {}, {}, {}],
+          details: ''
+        }
+      ]
+    });
   }
 };
 
@@ -181,5 +198,8 @@ const activeFileGroups = computed(() => {
   position: relative;
   height: 100%; /* 确保内容区域占满父容器 */
   overflow-y: auto; /* 允许内容滚动 */
+  min-height: 100vh; /* 允许容器扩展 */
+  display: inline-block;
+  max-width: 100%;
 }
 </style>
\ No newline at end of file
diff --git a/src/stores/files.ts b/src/stores/files.ts
index 19c95a8..a0cddcb 100644
--- a/src/stores/files.ts
+++ b/src/stores/files.ts
@@ -42,7 +42,7 @@ export const useFilesStore = defineStore('files', {
         visibleFiles: (state) => state.fileList.filter(file => file.visible),
     },
     actions: {
-        addFile(file: { label: string; name: number }) {
+        addFile(file) {
             this.fileList.push({...file, visible: true});
             this.activeFile = file.name;
         },