diff --git a/play/src/vxe-table.vue b/play/src/vxe-table.vue index 2849d58..43f5f1e 100644 --- a/play/src/vxe-table.vue +++ b/play/src/vxe-table.vue @@ -15,7 +15,7 @@ :enable="states.isVirtualScrollbar" :loading="states.isLoading" :tree-config="{transform: true}" - :column-config="{resizable: true}" + :column-config="{resizable: true }" :row-config="{isHover: true}" :checkbox-config="{labelField: 'id', highlight: true}" :data="states.tableData" @@ -27,79 +27,75 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + Upload - + Upload - + Upload - + Upload - + Upload - + Upload - + Upload - + Upload - + Upload - + Upload @@ -151,9 +147,13 @@ const getTableData = () => { parentId: null as number | null, name: 'Test-' + (count + 1), role: 'Develop', - sex: Math.random() < 0.5 ? '1' : '0', - age: 28, - address: Array(10).fill('long address long long long address').join(', ') + address: Array(10).fill('long address long long long address').join(', '), + // @ts-ignore + ...(Array.from({ length: 19 }).reduce((acc: any, _, idx) => { + acc[`sex${idx + 1}`] = Math.random() < 0.5 ? '1' : '0' + acc[`age${idx + 1}`] = Math.random() < 0.5 ? '1' : '0' + return acc + }, {} as Record)) } if (Math.random() < 0.5) { parentId = count @@ -193,7 +193,7 @@ const measure = (async () => { } const startTime = performance.now() - await NativeBird.mapSeries(Array.from({ length: 5 }), async (_, idx) => { + await NativeBird.mapSeries(Array.from({ length: 20 }), async (_, idx) => { await vxeTableRef.value.scrollTo(0, idx * 30) }) diff --git a/play/src/vxe-table/index.vue b/play/src/vxe-table/index.vue index 0d02e22..1f1d862 100644 --- a/play/src/vxe-table/index.vue +++ b/play/src/vxe-table/index.vue @@ -1,11 +1,6 @@