From bfdfeb40c7ba97511584a30477acf5ad801398ba Mon Sep 17 00:00:00 2001
From: YangYuGang <1378265336@qq.com>
Date: 星期二, 11 三月 2025 11:26:34 +0800
Subject: [PATCH] 一些更改

---
 src/views/demo/table/ResizeParentHeightTable.vue |   90 +++++++++++++++++++-------------------------
 1 files changed, 39 insertions(+), 51 deletions(-)

diff --git a/src/views/demo/table/ResizeParentHeightTable.vue b/src/views/demo/table/ResizeParentHeightTable.vue
index b10444c..52361a9 100644
--- a/src/views/demo/table/ResizeParentHeightTable.vue
+++ b/src/views/demo/table/ResizeParentHeightTable.vue
@@ -1,11 +1,11 @@
 <template>
   <div class="h-full flex p-4">
     <div class="flex flex-col pr-4 w-1/2">
-      <div class="flex-1">
+      <div class="flex-1 h-0">
         <BasicTable @register="registerTable" />
       </div>
-      <div class="h-4"></div>
-      <div class="flex-1">
+      <div class="h-4 shrink-0"></div>
+      <div class="flex-1 h-0">
         <BasicTable @register="registerTable" />
       </div>
     </div>
@@ -22,58 +22,46 @@
     </div>
   </div>
 </template>
-<script lang="ts">
-  import { defineComponent } from 'vue';
-  import { BasicTable, useTable } from '/@/components/Table';
+<script lang="ts" setup>
+  import { BasicTable, useTable } from '@/components/Table';
   import { getBasicColumns, getFormConfig } from './tableData';
 
-  import { demoListApi } from '/@/api/demo/table';
+  import { demoListApi } from '@/api/demo/table';
 
-  export default defineComponent({
-    components: { BasicTable },
-    setup(_) {
-      const [registerTable] = useTable({
-        api: demoListApi,
-        columns: getBasicColumns(),
-        useSearchForm: false,
-        formConfig: getFormConfig(),
-        showTableSetting: false,
-        tableSetting: { fullScreen: true },
-        showIndexColumn: false,
-        isCanResizeParent: true,
-        rowKey: 'id',
-      });
+  const [registerTable] = useTable({
+    api: demoListApi,
+    columns: getBasicColumns(),
+    useSearchForm: false,
+    formConfig: getFormConfig(),
+    showTableSetting: false,
+    tableSetting: { fullScreen: true },
+    showIndexColumn: false,
+    isCanResizeParent: true,
+    rowKey: 'id',
+  });
 
-      const [registerTable1] = useTable({
-        api: demoListApi,
-        columns: getBasicColumns(),
-        formConfig: getFormConfig(),
-        showTableSetting: false,
-        tableSetting: { fullScreen: true },
-        showIndexColumn: false,
-        isCanResizeParent: true,
-        useSearchForm: false,
-        rowKey: 'id',
-      });
+  const [registerTable1] = useTable({
+    api: demoListApi,
+    columns: getBasicColumns(),
+    formConfig: getFormConfig(),
+    showTableSetting: false,
+    tableSetting: { fullScreen: true },
+    showIndexColumn: false,
+    isCanResizeParent: true,
+    useSearchForm: false,
+    rowKey: 'id',
+  });
 
-      const [registerTable2] = useTable({
-        api: demoListApi,
-        columns: getBasicColumns(),
-        formConfig: getFormConfig(),
-        showTableSetting: false,
-        tableSetting: { fullScreen: true },
-        showIndexColumn: false,
-        isCanResizeParent: true,
-        useSearchForm: false,
-        pagination: false,
-        rowKey: 'id',
-      });
-
-      return {
-        registerTable,
-        registerTable1,
-        registerTable2,
-      };
-    },
+  const [registerTable2] = useTable({
+    api: demoListApi,
+    columns: getBasicColumns(),
+    formConfig: getFormConfig(),
+    showTableSetting: false,
+    tableSetting: { fullScreen: true },
+    showIndexColumn: false,
+    isCanResizeParent: true,
+    useSearchForm: false,
+    pagination: false,
+    rowKey: 'id',
   });
 </script>

--
Gitblit v1.9.3