From 9dfa701454d6a94690bad39dbb0e38f2a0b31489 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期二, 18 六月 2024 18:08:47 +0800
Subject: [PATCH] build

---
 src/views/demo/table/tableData.tsx |   82 ++++++++++++++++++++++++++++++++++++-----
 1 files changed, 72 insertions(+), 10 deletions(-)

diff --git a/src/views/demo/table/tableData.tsx b/src/views/demo/table/tableData.tsx
index 20d3975..5380530 100644
--- a/src/views/demo/table/tableData.tsx
+++ b/src/views/demo/table/tableData.tsx
@@ -1,7 +1,8 @@
-import { optionsListApi } from '/@/api/demo/select';
-import { FormProps, FormSchema } from '/@/components/Table';
-import { BasicColumn } from '/@/components/Table/src/types/table';
-import { VxeFormItemProps, VxeGridPropTypes } from '/@/components/VxeTable';
+import { optionsListApi } from '@/api/demo/select';
+import { FormProps, FormSchema, BasicColumn } from '@/components/Table';
+import { VxeFormItemProps, VxeGridPropTypes } from '@/components/VxeTable';
+import { ref } from 'vue';
+import { Input } from 'ant-design-vue';
 
 export function getBasicColumns(): BasicColumn[] {
   return [
@@ -73,6 +74,7 @@
 }
 
 export function getMultipleHeaderColumns(): BasicColumn[] {
+  const testRef = ref('濮撳悕:');
   return [
     {
       title: 'ID',
@@ -81,6 +83,11 @@
     },
     {
       title: '濮撳悕',
+      customHeaderRender() {
+        return (
+          <Input placeholder="杈撳叆鍊� 鏇存柊 鑷畾涔塼itle" size="small" v-model:value={testRef.value} />
+        );
+      },
       dataIndex: 'name',
       width: 120,
     },
@@ -91,6 +98,15 @@
       children: [
         {
           title: '缂栧彿',
+          customHeaderRender(column) {
+            // 銆愯嚜瀹氫箟娓叉煋鐨勩��
+            return (
+              <div>
+                _ <span style="background: #f00; color: #fff;">{testRef.value}</span> _
+                {column.customTitle}
+              </div>
+            );
+          },
           dataIndex: 'no',
           width: 120,
           filters: [
@@ -126,13 +142,11 @@
       // title: '濮撳悕',
       dataIndex: 'name',
       width: 120,
-      // slots: { title: 'customTitle' },
     },
     {
       // title: '鍦板潃',
       dataIndex: 'address',
       width: 120,
-      // slots: { title: 'customAddress' },
       sorter: true,
     },
 
@@ -214,7 +228,7 @@
   ];
 }
 export const getAdvanceSchema = (itemNumber = 6): FormSchema[] => {
-  const arr: any = [];
+  const arr: FormSchema[] = [];
   for (let index = 0; index < itemNumber; index++) {
     arr.push({
       field: `field${index}`,
@@ -236,7 +250,6 @@
       {
         field: `field11`,
         label: `Slot绀轰緥`,
-        component: 'Select',
         slot: 'custom',
         colProps: {
           xl: 12,
@@ -278,13 +291,62 @@
         endTime: new Date().toLocaleString(),
         children: [
           {
-            id: `l2-${index}`,
+            id: `l2-${index}-1`,
             name: 'John Brown',
-            age: `1${index}`,
+            age: `1`,
             no: `${index + 10}`,
             address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
             beginTime: new Date().toLocaleString(),
             endTime: new Date().toLocaleString(),
+            children: [
+              {
+                id: `l3-${index}-1-1`,
+                name: 'John Brown',
+                age: `11`,
+                no: `11`,
+                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
+                beginTime: new Date().toLocaleString(),
+                endTime: new Date().toLocaleString(),
+              },
+              {
+                id: `l3-${index}-1-2`,
+                name: 'John Brown',
+                age: `12`,
+                no: `12`,
+                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
+                beginTime: new Date().toLocaleString(),
+                endTime: new Date().toLocaleString(),
+              },
+            ],
+          },
+          {
+            id: `l2-${index}-2`,
+            name: 'John Brown',
+            age: `2`,
+            no: `${index + 10}`,
+            address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
+            beginTime: new Date().toLocaleString(),
+            endTime: new Date().toLocaleString(),
+            children: [
+              {
+                id: `l3-${index}-2-1`,
+                name: 'John Brown',
+                age: `21`,
+                no: `21`,
+                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
+                beginTime: new Date().toLocaleString(),
+                endTime: new Date().toLocaleString(),
+              },
+              {
+                id: `l3-${index}-2-2`,
+                name: 'John Brown',
+                age: `22`,
+                no: `22`,
+                address: 'New York No. 1 Lake ParkNew York No. 1 Lake Park',
+                beginTime: new Date().toLocaleString(),
+                endTime: new Date().toLocaleString(),
+              },
+            ],
           },
         ],
       });

--
Gitblit v1.9.3