|
15 | 15 | :enable="states.isVirtualScrollbar"
|
16 | 16 | :loading="states.isLoading"
|
17 | 17 | :tree-config="{transform: true}"
|
18 |
| - :column-config="{resizable: true}" |
| 18 | + :column-config="{resizable: true }" |
19 | 19 | :row-config="{isHover: true}"
|
20 | 20 | :checkbox-config="{labelField: 'id', highlight: true}"
|
21 | 21 | :data="states.tableData"
|
|
27 | 27 | <vxe-column field="name" title="Name" :width="140"></vxe-column>
|
28 | 28 | <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column>
|
29 | 29 | <vxe-column field="address" title="Address" show-overflow :min-width="300"></vxe-column>
|
30 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
31 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
32 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
33 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
34 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
35 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
36 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
37 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
38 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
39 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
40 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
41 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
42 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
43 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
44 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
45 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
46 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
47 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
48 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
49 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
50 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
51 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
52 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
53 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
54 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
55 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
56 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
57 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
58 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
59 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
60 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
61 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
62 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
63 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
64 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
65 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
66 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
67 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
68 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
69 |
| - <vxe-column field="sex" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
70 |
| - <vxe-column field="age" title="Age" :width="120"></vxe-column> |
71 |
| - <vxe-column field="address" title="Address Another" :width="1000"></vxe-column> |
72 |
| - <vxe-column field="address" title="Address Another" :width="1000"></vxe-column> |
73 |
| - <vxe-column field="address" title="Address Another" :width="1000"></vxe-column> |
| 30 | + <vxe-column field="age1" title="Age" :width="120"></vxe-column> |
| 31 | + <vxe-column field="sex1" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 32 | + <vxe-column field="age2" title="Age" :width="120"></vxe-column> |
| 33 | + <vxe-column field="sex2" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 34 | + <vxe-column field="age3" title="Age" :width="120"></vxe-column> |
| 35 | + <vxe-column field="sex3" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 36 | + <vxe-column field="age4" title="Age" :width="120"></vxe-column> |
| 37 | + <vxe-column field="sex4" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 38 | + <vxe-column field="age5" title="Age" :width="120"></vxe-column> |
| 39 | + <vxe-column field="sex5" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 40 | + <vxe-column field="age6" title="Age" :width="120"></vxe-column> |
| 41 | + <vxe-column field="sex6" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 42 | + <vxe-column field="age7" title="Age" :width="120"></vxe-column> |
| 43 | + <vxe-column field="sex7" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 44 | + <vxe-column field="age8" title="Age" :width="120"></vxe-column> |
| 45 | + <vxe-column field="sex8" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 46 | + <vxe-column field="age9" title="Age" :width="120"></vxe-column> |
| 47 | + <vxe-column field="sex9" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 48 | + <vxe-column field="age10" title="Age" :width="120"></vxe-column> |
| 49 | + <vxe-column field="sex10" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 50 | + <vxe-column field="age11" title="Age" :width="120"></vxe-column> |
| 51 | + <vxe-column field="sex11" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 52 | + <vxe-column field="age12" title="Age" :width="120"></vxe-column> |
| 53 | + <vxe-column field="sex12" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 54 | + <vxe-column field="age13" title="Age" :width="120"></vxe-column> |
| 55 | + <vxe-column field="sex13" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 56 | + <vxe-column field="age14" title="Age" :width="120"></vxe-column> |
| 57 | + <vxe-column field="sex14" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 58 | + <vxe-column field="age15" title="Age" :width="120"></vxe-column> |
| 59 | + <vxe-column field="sex15" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 60 | + <vxe-column field="age16" title="Age" :width="120"></vxe-column> |
| 61 | + <vxe-column field="sex16" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 62 | + <vxe-column field="age17" title="Age" :width="120"></vxe-column> |
| 63 | + <vxe-column field="sex17" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 64 | + <vxe-column field="age18" title="Age" :width="120"></vxe-column> |
| 65 | + <vxe-column field="sex18" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 66 | + <vxe-column field="age19" title="Age" :width="120"></vxe-column> |
| 67 | + <vxe-column field="sex19" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
| 68 | + <vxe-column field="age20" title="Age" :width="120"></vxe-column> |
| 69 | + <vxe-column field="sex20" title="Sex" :formatter="formatterSex" :width="140"></vxe-column> |
74 | 70 | <vxe-column width="500" fixed="right">
|
75 |
| - <el-button size="small" type="text"> |
| 71 | + <el-button size="small" text> |
76 | 72 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
77 | 73 | </el-button>
|
78 |
| - <el-button size="small" type="text"> |
| 74 | + <el-button size="small" text> |
79 | 75 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
80 | 76 | </el-button>
|
81 |
| - <el-button size="small" type="text"> |
| 77 | + <el-button size="small" text> |
82 | 78 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
83 | 79 | </el-button>
|
84 |
| - <el-button size="small" type="text"> |
| 80 | + <el-button size="small" text> |
85 | 81 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
86 | 82 | </el-button>
|
87 |
| - <el-button size="small" type="text"> |
| 83 | + <el-button size="small" text> |
88 | 84 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
89 | 85 | </el-button>
|
90 |
| - <el-button size="small" type="text"> |
| 86 | + <el-button size="small" text> |
91 | 87 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
92 | 88 | </el-button>
|
93 |
| - <el-button size="small" type="text"> |
| 89 | + <el-button size="small" text> |
94 | 90 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
95 | 91 | </el-button>
|
96 |
| - <el-button size="small" type="text"> |
| 92 | + <el-button size="small" text> |
97 | 93 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
98 | 94 | </el-button>
|
99 |
| - <el-button size="small" type="text"> |
| 95 | + <el-button size="small" text> |
100 | 96 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
101 | 97 | </el-button>
|
102 |
| - <el-button size="small" type="text"> |
| 98 | + <el-button size="small" text> |
103 | 99 | Upload<el-icon class="el-icon--right"><Upload /></el-icon>
|
104 | 100 | </el-button>
|
105 | 101 | </vxe-column>
|
@@ -151,9 +147,13 @@ const getTableData = () => {
|
151 | 147 | parentId: null as number | null,
|
152 | 148 | name: 'Test-' + (count + 1),
|
153 | 149 | role: 'Develop',
|
154 |
| - sex: Math.random() < 0.5 ? '1' : '0', |
155 |
| - age: 28, |
156 |
| - address: Array(10).fill('long address long long long address').join(', ') |
| 150 | + address: Array(10).fill('long address long long long address').join(', '), |
| 151 | + // @ts-ignore |
| 152 | + ...(Array.from({ length: 19 }).reduce((acc: any, _, idx) => { |
| 153 | + acc[`sex${idx + 1}`] = Math.random() < 0.5 ? '1' : '0' |
| 154 | + acc[`age${idx + 1}`] = Math.random() < 0.5 ? '1' : '0' |
| 155 | + return acc |
| 156 | + }, {} as Record<string, string>)) |
157 | 157 | }
|
158 | 158 | if (Math.random() < 0.5) {
|
159 | 159 | parentId = count
|
@@ -193,7 +193,7 @@ const measure = (async () => {
|
193 | 193 | }
|
194 | 194 | const startTime = performance.now()
|
195 | 195 |
|
196 |
| - await NativeBird.mapSeries(Array.from({ length: 5 }), async (_, idx) => { |
| 196 | + await NativeBird.mapSeries(Array.from({ length: 20 }), async (_, idx) => { |
197 | 197 | await vxeTableRef.value.scrollTo(0, idx * 30)
|
198 | 198 | })
|
199 | 199 |
|
|
0 commit comments