vxe-table 4.23.8 → 4.23.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +5715 -3783
- package/es/components.d.ts +1 -0
- package/es/components.js +2 -7
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +397 -120
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/module/custom/hook.js +49 -42
- package/es/table/module/custom/panel.js +777 -527
- package/es/table/module/edit/hook.js +140 -62
- package/es/table/module/export/export-panel.js +399 -316
- package/es/table/module/export/hook.js +395 -337
- package/es/table/module/export/import-panel.js +152 -123
- package/es/table/module/filter/hook.js +16 -2
- package/es/table/module/filter/panel.js +146 -84
- package/es/table/module/keyboard/hook.js +8 -4
- package/es/table/module/menu/panel.js +197 -126
- package/es/table/render/index.js +151 -98
- package/es/table/src/body.js +355 -233
- package/es/table/src/cell.js +426 -269
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/footer.js +144 -99
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +229 -172
- package/es/table/src/table.js +1503 -1030
- package/es/table/src/util.js +15 -19
- package/es/toolbar/src/toolbar.js +132 -75
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +2 -7
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +397 -120
- package/lib/index.common.js +1 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +5732 -3800
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/custom/hook.js +49 -42
- package/lib/table/module/custom/panel.js +777 -527
- package/lib/table/module/edit/hook.js +140 -62
- package/lib/table/module/export/export-panel.js +399 -316
- package/lib/table/module/export/hook.js +395 -337
- package/lib/table/module/export/import-panel.js +152 -123
- package/lib/table/module/filter/hook.js +16 -2
- package/lib/table/module/filter/panel.js +146 -84
- package/lib/table/module/keyboard/hook.js +8 -4
- package/lib/table/module/menu/panel.js +197 -126
- package/lib/table/render/index.js +151 -98
- package/lib/table/src/body.js +355 -233
- package/lib/table/src/cell.js +426 -269
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/footer.js +144 -99
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +229 -172
- package/lib/table/src/table.js +1471 -1029
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/src/toolbar.js +132 -75
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/package.json +2 -2
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -44
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -11
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -520
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -3
- package/packages/v-x-e-table/index.ts +3 -3
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
|
@@ -1,1743 +1,2002 @@
|
|
|
1
|
-
import { h, inject, ref, Ref, provide, VNode, PropType, nextTick, TransitionGroup, reactive, onUnmounted } from 'vue'
|
|
2
|
-
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
|
-
import { VxeUI } from '@vxe-ui/core'
|
|
4
|
-
import { formatText, hasEnableConf } from '../../../ui/src/utils'
|
|
5
|
-
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom'
|
|
6
|
-
import { createComponentLog } from '../../../ui/src/log'
|
|
7
|
-
import XEUtils from 'xe-utils'
|
|
8
|
-
|
|
9
|
-
import type { VxeButtonEvents, VxeButtonDefines } from 'vxe-pc-ui'
|
|
10
|
-
import type { VxeTableDefines, VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes, VxeTableCustomPanelConstructor, TableCustomPanelReactData, TableCustomPanelInternalData, TableCustomPanelPrivateRef, TableCustomPanelPrivateComputed } from '../../../../types'
|
|
11
|
-
|
|
12
|
-
const { errLog } = createComponentLog('table')
|
|
13
|
-
|
|
14
|
-
const { getI18n, getIcon, renderEmptyElement } = VxeUI
|
|
15
|
-
|
|
16
|
-
export function createInternalData
|
|
17
|
-
return {
|
|
18
|
-
// teleportTo: undefined,
|
|
19
|
-
// prevDragCol: undefined,
|
|
20
|
-
// prevDragGroupField: undefined,
|
|
21
|
-
// prevDragAggFnColid: undefined,
|
|
22
|
-
// prevDragToChild: false,
|
|
23
|
-
// prevDragPos: null,
|
|
24
|
-
// customDragTime: null
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export default defineVxeComponent({
|
|
29
|
-
name: 'TableCustomPanel',
|
|
30
|
-
props: {
|
|
31
|
-
customStore: {
|
|
32
|
-
type: Object as PropType<VxeTableDefines.VxeTableCustomStoreObj>,
|
|
33
|
-
default: () => ({} as VxeTableDefines.VxeTableCustomStoreObj
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
setup
|
|
37
|
-
const xID = XEUtils.uniqueId()
|
|
38
|
-
|
|
39
|
-
const VxeUIModalComponent = VxeUI.getComponent('VxeModal')
|
|
40
|
-
const VxeUIDrawerComponent = VxeUI.getComponent('VxeDrawer')
|
|
41
|
-
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton')
|
|
42
|
-
const VxeUINumberInputComponent = VxeUI.getComponent('VxeNumberInput')
|
|
43
|
-
const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup')
|
|
44
|
-
|
|
45
|
-
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
46
|
-
|
|
47
|
-
const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
48
|
-
const { computeSize, computeCustomOpts, computeMouseOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps()
|
|
49
|
-
|
|
50
|
-
const refElem = ref() as Ref<HTMLDivElement>
|
|
51
|
-
const refBodyWrapperElem = ref() as Ref<HTMLDivElement>
|
|
52
|
-
const refCustomBodyElem = ref() as Ref<HTMLDivElement>
|
|
53
|
-
const refDragLineElem = ref() as Ref<HTMLDivElement>
|
|
54
|
-
const refDragTipElem = ref() as Ref<HTMLDivElement>
|
|
55
|
-
|
|
56
|
-
const customPanelReactData = reactive<TableCustomPanelReactData>({
|
|
57
|
-
dragCol: null,
|
|
58
|
-
dragGroupField: null,
|
|
59
|
-
dragAggFnCol: null,
|
|
60
|
-
dragTipText: ''
|
|
61
|
-
})
|
|
62
|
-
|
|
63
|
-
let customPanelInternalData = createInternalData()
|
|
64
|
-
|
|
65
|
-
const refMaps: TableCustomPanelPrivateRef = {
|
|
66
|
-
refElem,
|
|
67
|
-
refBodyWrapperElem,
|
|
68
|
-
refCustomBodyElem,
|
|
69
|
-
refDragLineElem,
|
|
70
|
-
refDragTipElem
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
const computeMaps: TableCustomPanelPrivateComputed = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
$xeTable.
|
|
95
|
-
$xeTable.
|
|
96
|
-
$xeTable.
|
|
97
|
-
$xeTable.
|
|
98
|
-
$xeTable.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
$xeTable.
|
|
104
|
-
$xeTable.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
$xeTable.
|
|
110
|
-
$xeTable.
|
|
111
|
-
$xeTable.
|
|
112
|
-
$xeTable.
|
|
113
|
-
$xeTable.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
$xeTable.
|
|
119
|
-
$xeTable.
|
|
120
|
-
$xeTable.
|
|
121
|
-
$xeTable.
|
|
122
|
-
$xeTable.
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
parentItem.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
item.
|
|
162
|
-
item.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
$xeTable.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
item.
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
$xeTable.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
column.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
$xeTable.
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
const
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
col.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
col.
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
$xeTable.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
dragLineEl.style.display = ''
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
const {
|
|
376
|
-
const {
|
|
377
|
-
const {
|
|
378
|
-
const
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
if (
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
customPanelInternalData.
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
const
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
:
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
}
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
:
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1
|
+
import { h, inject, ref, Ref, provide, VNode, PropType, nextTick, TransitionGroup, reactive, onUnmounted } from 'vue'
|
|
2
|
+
import { defineVxeComponent } from '../../../ui/src/comp'
|
|
3
|
+
import { VxeUI } from '@vxe-ui/core'
|
|
4
|
+
import { formatText, hasEnableConf } from '../../../ui/src/utils'
|
|
5
|
+
import { getTpImg, addClass, removeClass, hasControlKey } from '../../../ui/src/dom'
|
|
6
|
+
import { createComponentLog } from '../../../ui/src/log'
|
|
7
|
+
import XEUtils from 'xe-utils'
|
|
8
|
+
|
|
9
|
+
import type { VxeButtonEvents, VxeButtonDefines } from 'vxe-pc-ui'
|
|
10
|
+
import type { VxeTableDefines, VxeTablePrivateMethods, VxeTableConstructor, VxeTableMethods, VxeColumnPropTypes, VxeTableCustomPanelConstructor, TableCustomPanelReactData, TableCustomPanelInternalData, TableCustomPanelPrivateRef, TableCustomPanelPrivateComputed } from '../../../../types'
|
|
11
|
+
|
|
12
|
+
const { errLog } = createComponentLog('table')
|
|
13
|
+
|
|
14
|
+
const { getI18n, getIcon, renderEmptyElement } = VxeUI
|
|
15
|
+
|
|
16
|
+
export function createInternalData(): TableCustomPanelInternalData {
|
|
17
|
+
return {
|
|
18
|
+
// teleportTo: undefined,
|
|
19
|
+
// prevDragCol: undefined,
|
|
20
|
+
// prevDragGroupField: undefined,
|
|
21
|
+
// prevDragAggFnColid: undefined,
|
|
22
|
+
// prevDragToChild: false,
|
|
23
|
+
// prevDragPos: null,
|
|
24
|
+
// customDragTime: null
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default defineVxeComponent({
|
|
29
|
+
name: 'TableCustomPanel',
|
|
30
|
+
props: {
|
|
31
|
+
customStore: {
|
|
32
|
+
type: Object as PropType<VxeTableDefines.VxeTableCustomStoreObj>,
|
|
33
|
+
default: () => ({}) as VxeTableDefines.VxeTableCustomStoreObj
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
setup(props, context) {
|
|
37
|
+
const xID = XEUtils.uniqueId()
|
|
38
|
+
|
|
39
|
+
const VxeUIModalComponent = VxeUI.getComponent('VxeModal')
|
|
40
|
+
const VxeUIDrawerComponent = VxeUI.getComponent('VxeDrawer')
|
|
41
|
+
const VxeUIButtonComponent = VxeUI.getComponent('VxeButton')
|
|
42
|
+
const VxeUINumberInputComponent = VxeUI.getComponent('VxeNumberInput')
|
|
43
|
+
const VxeUIRadioGroupComponent = VxeUI.getComponent('VxeRadioGroup')
|
|
44
|
+
|
|
45
|
+
const $xeTable = inject('$xeTable', {} as VxeTableConstructor & VxeTableMethods & VxeTablePrivateMethods)
|
|
46
|
+
|
|
47
|
+
const { props: tableProps, reactData: tableReactData, internalData: tableInternalData } = $xeTable
|
|
48
|
+
const { computeSize, computeCustomOpts, computeMouseOpts, computeColumnDragOpts, computeColumnOpts, computeIsMaxFixedColumn, computeResizableOpts, computeAggregateOpts } = $xeTable.getComputeMaps()
|
|
49
|
+
|
|
50
|
+
const refElem = ref() as Ref<HTMLDivElement>
|
|
51
|
+
const refBodyWrapperElem = ref() as Ref<HTMLDivElement>
|
|
52
|
+
const refCustomBodyElem = ref() as Ref<HTMLDivElement>
|
|
53
|
+
const refDragLineElem = ref() as Ref<HTMLDivElement>
|
|
54
|
+
const refDragTipElem = ref() as Ref<HTMLDivElement>
|
|
55
|
+
|
|
56
|
+
const customPanelReactData = reactive<TableCustomPanelReactData>({
|
|
57
|
+
dragCol: null,
|
|
58
|
+
dragGroupField: null,
|
|
59
|
+
dragAggFnCol: null,
|
|
60
|
+
dragTipText: ''
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
let customPanelInternalData = createInternalData()
|
|
64
|
+
|
|
65
|
+
const refMaps: TableCustomPanelPrivateRef = {
|
|
66
|
+
refElem,
|
|
67
|
+
refBodyWrapperElem,
|
|
68
|
+
refCustomBodyElem,
|
|
69
|
+
refDragLineElem,
|
|
70
|
+
refDragTipElem
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const computeMaps: TableCustomPanelPrivateComputed = {}
|
|
74
|
+
|
|
75
|
+
const handleWrapperMouseenterEvent = (evnt: Event) => {
|
|
76
|
+
const { customStore } = props
|
|
77
|
+
customStore.activeWrapper = true
|
|
78
|
+
$xeTable.customOpenEvent(evnt)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const handleWrapperMouseleaveEvent = (evnt: Event) => {
|
|
82
|
+
const { customStore } = props
|
|
83
|
+
customStore.activeWrapper = false
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
if (!customStore.activeBtn && !customStore.activeWrapper) {
|
|
86
|
+
$xeTable.customCloseEvent(evnt)
|
|
87
|
+
}
|
|
88
|
+
}, 300)
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const confirmCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
92
|
+
tableReactData.isCustomStatus = true
|
|
93
|
+
$xeTable.saveCustom()
|
|
94
|
+
$xeTable.closeCustom()
|
|
95
|
+
$xeTable.emitCustomEvent('confirm', $event)
|
|
96
|
+
$xeTable.dispatchEvent('custom-confirm', {}, $event)
|
|
97
|
+
$xeTable.emitCustomEvent('close', $event)
|
|
98
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const cancelCloseEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
102
|
+
$xeTable.closeCustom()
|
|
103
|
+
$xeTable.emitCustomEvent('close', $event)
|
|
104
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const cancelCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
108
|
+
$xeTable.cancelCustom()
|
|
109
|
+
$xeTable.closeCustom()
|
|
110
|
+
$xeTable.emitCustomEvent('cancel', $event)
|
|
111
|
+
$xeTable.dispatchEvent('custom-cancel', {}, $event)
|
|
112
|
+
$xeTable.emitCustomEvent('close', $event)
|
|
113
|
+
$xeTable.dispatchEvent('custom-close', {}, $event)
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const handleResetCustomEvent = (evnt: Event) => {
|
|
117
|
+
$xeTable.resetCustom(true)
|
|
118
|
+
$xeTable.closeCustom()
|
|
119
|
+
$xeTable.emitCustomEvent('reset', evnt)
|
|
120
|
+
$xeTable.dispatchEvent('custom-reset', {}, evnt)
|
|
121
|
+
$xeTable.emitCustomEvent('close', evnt)
|
|
122
|
+
$xeTable.dispatchEvent('custom-close', {}, evnt)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const resetCustomEvent: VxeButtonEvents.Click = ({ $event }) => {
|
|
126
|
+
if (VxeUI.modal) {
|
|
127
|
+
VxeUI.modal
|
|
128
|
+
.confirm({
|
|
129
|
+
content: getI18n('vxe.custom.cstmConfirmRestore'),
|
|
130
|
+
className: 'vxe-table--ignore-clear',
|
|
131
|
+
escClosable: true
|
|
132
|
+
})
|
|
133
|
+
.then((type) => {
|
|
134
|
+
if (type === 'confirm') {
|
|
135
|
+
handleResetCustomEvent($event)
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
} else {
|
|
139
|
+
handleResetCustomEvent($event)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const handleOptionCheck = (column: VxeTableDefines.ColumnInfo) => {
|
|
144
|
+
const { customColumnList } = tableReactData
|
|
145
|
+
const matchObj = XEUtils.findTree(customColumnList, (item) => item === column)
|
|
146
|
+
if (matchObj && matchObj.parent) {
|
|
147
|
+
const { parent: parentItem } = matchObj
|
|
148
|
+
if (parentItem.children && parentItem.children.length) {
|
|
149
|
+
parentItem.renderVisible = parentItem.children.every((column) => column.renderVisible)
|
|
150
|
+
parentItem.halfVisible = !parentItem.renderVisible && parentItem.children.some((column) => column.renderVisible || column.halfVisible)
|
|
151
|
+
handleOptionCheck(parentItem)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const changeCheckboxOption = (column: VxeTableDefines.ColumnInfo, evnt: MouseEvent) => {
|
|
157
|
+
const isChecked = !column.renderVisible
|
|
158
|
+
const customOpts = computeCustomOpts.value
|
|
159
|
+
if (customOpts.immediate) {
|
|
160
|
+
XEUtils.eachTree([column], (item) => {
|
|
161
|
+
item.visible = isChecked
|
|
162
|
+
item.renderVisible = isChecked
|
|
163
|
+
item.halfVisible = false
|
|
164
|
+
})
|
|
165
|
+
tableReactData.isCustomStatus = true
|
|
166
|
+
$xeTable.handleCustom()
|
|
167
|
+
$xeTable.saveCustomStore('update:visible')
|
|
168
|
+
} else {
|
|
169
|
+
XEUtils.eachTree([column], (item) => {
|
|
170
|
+
item.renderVisible = isChecked
|
|
171
|
+
item.halfVisible = false
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
handleOptionCheck(column)
|
|
175
|
+
$xeTable.checkCustomStatus()
|
|
176
|
+
$xeTable.dispatchEvent('custom-visible-change', { column, checked: isChecked }, evnt)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const changeColumnWidth = (column: VxeTableDefines.ColumnInfo) => {
|
|
180
|
+
const customOpts = computeCustomOpts.value
|
|
181
|
+
if (customOpts.immediate) {
|
|
182
|
+
if (column.renderResizeWidth !== column.renderWidth) {
|
|
183
|
+
column.resizeWidth = column.renderResizeWidth
|
|
184
|
+
column.renderWidth = column.renderResizeWidth
|
|
185
|
+
tableReactData.isCustomStatus = true
|
|
186
|
+
$xeTable.handleCustom()
|
|
187
|
+
$xeTable.saveCustomStore('update:width')
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const changeFixedOption = (column: VxeTableDefines.ColumnInfo, colFixed: VxeColumnPropTypes.Fixed, evnt: Event) => {
|
|
193
|
+
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
194
|
+
const customOpts = computeCustomOpts.value
|
|
195
|
+
let targetFixed: VxeColumnPropTypes.Fixed = null
|
|
196
|
+
if (customOpts.immediate) {
|
|
197
|
+
if (column.renderFixed === colFixed) {
|
|
198
|
+
targetFixed = ''
|
|
199
|
+
XEUtils.eachTree([column], (col) => {
|
|
200
|
+
col.fixed = ''
|
|
201
|
+
col.renderFixed = ''
|
|
202
|
+
})
|
|
203
|
+
} else {
|
|
204
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
205
|
+
targetFixed = colFixed
|
|
206
|
+
XEUtils.eachTree([column], (col) => {
|
|
207
|
+
col.fixed = colFixed
|
|
208
|
+
col.renderFixed = colFixed
|
|
209
|
+
})
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
tableReactData.isCustomStatus = true
|
|
213
|
+
$xeTable.handleCustom()
|
|
214
|
+
$xeTable.saveCustomStore('update:fixed')
|
|
215
|
+
} else {
|
|
216
|
+
if (column.renderFixed === colFixed) {
|
|
217
|
+
targetFixed = ''
|
|
218
|
+
XEUtils.eachTree([column], (col) => {
|
|
219
|
+
col.renderFixed = ''
|
|
220
|
+
})
|
|
221
|
+
} else {
|
|
222
|
+
if (!isMaxFixedColumn || column.renderFixed) {
|
|
223
|
+
targetFixed = colFixed
|
|
224
|
+
XEUtils.eachTree([column], (col) => {
|
|
225
|
+
col.renderFixed = colFixed
|
|
226
|
+
})
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (targetFixed !== null) {
|
|
231
|
+
$xeTable.dispatchEvent('custom-fixed-change', { column, fixed: targetFixed }, evnt)
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const changeAlignOption = (
|
|
236
|
+
column: VxeTableDefines.ColumnInfo,
|
|
237
|
+
targetAlign: VxeColumnPropTypes.Align,
|
|
238
|
+
colProperty: 'align' | 'headerAlign' | 'footerAlign',
|
|
239
|
+
renderProperty: 'renderAlign' | 'renderHeaderAlign' | 'renderFooterAlign',
|
|
240
|
+
eName: 'custom-align-change' | 'custom-header-align-change' | 'custom-footer-align-change',
|
|
241
|
+
evnt: Event
|
|
242
|
+
) => {
|
|
243
|
+
const customOpts = computeCustomOpts.value
|
|
244
|
+
if (customOpts.immediate) {
|
|
245
|
+
column[colProperty] = targetAlign
|
|
246
|
+
column[renderProperty] = targetAlign
|
|
247
|
+
tableReactData.isCustomStatus = true
|
|
248
|
+
$xeTable.handleCustom()
|
|
249
|
+
$xeTable.saveCustomStore(`update:${colProperty}`)
|
|
250
|
+
} else {
|
|
251
|
+
column[renderProperty] = targetAlign
|
|
252
|
+
}
|
|
253
|
+
$xeTable.dispatchEvent(eName, { column, [colProperty]: targetAlign }, evnt)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const allOptionEvent = (evnt: MouseEvent) => {
|
|
257
|
+
const { customStore } = tableReactData
|
|
258
|
+
const isAll = !customStore.isAll
|
|
259
|
+
$xeTable.toggleCustomAllCheckbox()
|
|
260
|
+
$xeTable.dispatchEvent('custom-visible-all', { checked: isAll }, evnt)
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const showDropTip = (evnt: DragEvent | MouseEvent, optEl: HTMLElement | null, showLine: boolean, dragPos: string) => {
|
|
264
|
+
const bodyWrapperElem = refBodyWrapperElem.value
|
|
265
|
+
if (!bodyWrapperElem) {
|
|
266
|
+
return
|
|
267
|
+
}
|
|
268
|
+
const customBodyElem = refCustomBodyElem.value
|
|
269
|
+
if (!customBodyElem) {
|
|
270
|
+
return
|
|
271
|
+
}
|
|
272
|
+
const { prevDragToChild } = customPanelInternalData
|
|
273
|
+
const bodyWrapperRect = bodyWrapperElem.getBoundingClientRect()
|
|
274
|
+
const customBodyRect = customBodyElem.getBoundingClientRect()
|
|
275
|
+
const dragLineEl = refDragLineElem.value
|
|
276
|
+
if (optEl) {
|
|
277
|
+
if (dragLineEl) {
|
|
278
|
+
if (showLine) {
|
|
279
|
+
const optRect = optEl.getBoundingClientRect()
|
|
280
|
+
dragLineEl.style.display = 'block'
|
|
281
|
+
dragLineEl.style.left = `${Math.max(0, customBodyRect.x - bodyWrapperRect.x)}px`
|
|
282
|
+
dragLineEl.style.top = `${Math.max(1, optRect.y + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`
|
|
283
|
+
dragLineEl.style.height = `${optRect.height}px`
|
|
284
|
+
dragLineEl.style.width = `${optRect.width}px`
|
|
285
|
+
dragLineEl.setAttribute('drag-pos', dragPos)
|
|
286
|
+
dragLineEl.setAttribute('drag-to-child', prevDragToChild ? 'y' : 'n')
|
|
287
|
+
} else {
|
|
288
|
+
dragLineEl.style.display = ''
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
} else {
|
|
292
|
+
if (dragLineEl) {
|
|
293
|
+
dragLineEl.style.display = 'node'
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
const dragTipEl = refDragTipElem.value
|
|
297
|
+
if (dragTipEl) {
|
|
298
|
+
dragTipEl.style.display = 'block'
|
|
299
|
+
dragTipEl.style.top = `${Math.min(bodyWrapperElem.clientHeight + bodyWrapperElem.scrollTop - dragTipEl.clientHeight, evnt.clientY + bodyWrapperElem.scrollTop - bodyWrapperRect.y)}px`
|
|
300
|
+
dragTipEl.style.left = `${Math.min(bodyWrapperElem.clientWidth + bodyWrapperElem.scrollLeft - dragTipEl.clientWidth, evnt.clientX + bodyWrapperElem.scrollLeft - bodyWrapperRect.x)}px`
|
|
301
|
+
dragTipEl.setAttribute('drag-status', showLine ? (prevDragToChild ? 'sub' : 'normal') : 'disabled')
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const updateColDropTipContent = () => {
|
|
306
|
+
const { dragCol } = customPanelReactData
|
|
307
|
+
const columnDragOpts = computeColumnDragOpts.value
|
|
308
|
+
const { tooltipMethod } = columnDragOpts
|
|
309
|
+
let tipContent = ''
|
|
310
|
+
if (tooltipMethod) {
|
|
311
|
+
const dtParams = {
|
|
312
|
+
$table: $xeTable,
|
|
313
|
+
column: dragCol as VxeTableDefines.ColumnInfo
|
|
314
|
+
}
|
|
315
|
+
tipContent = `${tooltipMethod(dtParams) || ''}`
|
|
316
|
+
} else {
|
|
317
|
+
tipContent = getI18n('vxe.custom.cstmDragTarget', [dragCol && dragCol.type !== 'html' ? dragCol.getTitle() : ''])
|
|
318
|
+
}
|
|
319
|
+
customPanelReactData.dragTipText = tipContent
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const hideDropTip = () => {
|
|
323
|
+
const dragTipEl = refDragTipElem.value
|
|
324
|
+
const dragLineEl = refDragLineElem.value
|
|
325
|
+
if (dragTipEl) {
|
|
326
|
+
dragTipEl.style.display = ''
|
|
327
|
+
}
|
|
328
|
+
if (dragLineEl) {
|
|
329
|
+
dragLineEl.style.display = ''
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
const sortMousedownEvent = (evnt: DragEvent) => {
|
|
334
|
+
const btnEl = evnt.currentTarget as HTMLElement
|
|
335
|
+
const cellEl = btnEl.parentElement as HTMLElement
|
|
336
|
+
const tdEl = cellEl.parentElement as HTMLElement
|
|
337
|
+
const trEl = tdEl.parentElement as HTMLElement
|
|
338
|
+
const colid = trEl.getAttribute('colid')
|
|
339
|
+
const column = $xeTable.getColumnById(colid)
|
|
340
|
+
trEl.draggable = true
|
|
341
|
+
customPanelReactData.dragCol = column
|
|
342
|
+
customPanelReactData.dragGroupField = null
|
|
343
|
+
customPanelReactData.dragAggFnCol = null
|
|
344
|
+
updateColDropTipContent()
|
|
345
|
+
addClass(trEl, 'active--drag-origin')
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const sortMouseupEvent = (evnt: MouseEvent) => {
|
|
349
|
+
const btnEl = evnt.currentTarget as HTMLElement
|
|
350
|
+
const cellEl = btnEl.parentElement as HTMLElement
|
|
351
|
+
const tdEl = cellEl.parentElement as HTMLElement
|
|
352
|
+
const trEl = tdEl.parentElement as HTMLElement
|
|
353
|
+
hideDropTip()
|
|
354
|
+
trEl.draggable = false
|
|
355
|
+
customPanelReactData.dragCol = null
|
|
356
|
+
customPanelReactData.dragGroupField = null
|
|
357
|
+
customPanelReactData.dragAggFnCol = null
|
|
358
|
+
removeClass(trEl, 'active--drag-origin')
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
const sortDragstartEvent = (evnt: DragEvent) => {
|
|
362
|
+
const { customDragTime } = customPanelInternalData
|
|
363
|
+
if (evnt.dataTransfer) {
|
|
364
|
+
evnt.dataTransfer.setDragImage(getTpImg(), 0, 0)
|
|
365
|
+
}
|
|
366
|
+
if (customDragTime) {
|
|
367
|
+
clearTimeout(customDragTime)
|
|
368
|
+
}
|
|
369
|
+
tableReactData.isCustomDragStatus = true
|
|
370
|
+
customPanelInternalData.prevDragGroupField = null
|
|
371
|
+
customPanelInternalData.prevDragAggFnColid = null
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
const sortDragendEvent = (evnt: DragEvent) => {
|
|
375
|
+
const { mouseConfig } = tableProps
|
|
376
|
+
const { customColumnList } = tableReactData
|
|
377
|
+
const { collectColumn } = tableInternalData
|
|
378
|
+
const customOpts = computeCustomOpts.value
|
|
379
|
+
const mouseOpts = computeMouseOpts.value
|
|
380
|
+
const { immediate } = customOpts
|
|
381
|
+
const trEl = evnt.currentTarget as HTMLElement
|
|
382
|
+
const columnDragOpts = computeColumnDragOpts.value
|
|
383
|
+
const { isCrossDrag, isPeerDrag, isSelfToChildDrag, isToChildDrag, dragEndMethod } = columnDragOpts
|
|
384
|
+
const { dragCol } = customPanelReactData
|
|
385
|
+
const { prevDragCol, prevDragGroupField, prevDragAggFnColid, prevDragPos, prevDragToChild } = customPanelInternalData
|
|
386
|
+
const dragOffsetIndex = prevDragPos === 'bottom' ? 1 : 0
|
|
387
|
+
|
|
388
|
+
if (prevDragGroupField || prevDragAggFnColid) {
|
|
389
|
+
if ($xeTable.handlePivotTableAggPanelDragendEvent) {
|
|
390
|
+
$xeTable.handlePivotTableAggPanelDragendEvent(evnt)
|
|
391
|
+
}
|
|
392
|
+
} else if (prevDragCol && dragCol) {
|
|
393
|
+
// 判断是否有拖动
|
|
394
|
+
if (prevDragCol !== dragCol) {
|
|
395
|
+
const dragColumn = dragCol
|
|
396
|
+
const newColumn = prevDragCol
|
|
397
|
+
Promise.resolve(
|
|
398
|
+
dragEndMethod
|
|
399
|
+
? dragEndMethod({
|
|
400
|
+
oldColumn: dragColumn,
|
|
401
|
+
newColumn,
|
|
402
|
+
dragColumn,
|
|
403
|
+
dragPos: prevDragPos as any,
|
|
404
|
+
dragToChild: !!prevDragToChild,
|
|
405
|
+
offsetIndex: dragOffsetIndex
|
|
406
|
+
})
|
|
407
|
+
: true
|
|
408
|
+
)
|
|
409
|
+
.then((status) => {
|
|
410
|
+
if (!status) {
|
|
411
|
+
return
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
let oafIndex = -1
|
|
415
|
+
let nafIndex = -1
|
|
416
|
+
|
|
417
|
+
const oldAllMaps: Record<string, any> = {}
|
|
418
|
+
XEUtils.eachTree([dragColumn], (column) => {
|
|
419
|
+
oldAllMaps[column.id] = column
|
|
420
|
+
})
|
|
421
|
+
|
|
422
|
+
let isSelfToChildStatus = false
|
|
423
|
+
|
|
424
|
+
// 只有实时拖拽支持跨层级
|
|
425
|
+
if (immediate) {
|
|
426
|
+
if (dragColumn.parentId && newColumn.parentId) {
|
|
427
|
+
// 子到子
|
|
428
|
+
|
|
429
|
+
if (isPeerDrag && !isCrossDrag) {
|
|
430
|
+
if (dragColumn.parentId !== newColumn.parentId) {
|
|
431
|
+
// 非同级
|
|
432
|
+
return
|
|
433
|
+
}
|
|
434
|
+
} else {
|
|
435
|
+
if (!isCrossDrag) {
|
|
436
|
+
return
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
if (oldAllMaps[newColumn.id]) {
|
|
440
|
+
isSelfToChildStatus = true
|
|
441
|
+
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
442
|
+
if (VxeUI.modal) {
|
|
443
|
+
VxeUI.modal.message({
|
|
444
|
+
status: 'error',
|
|
445
|
+
content: getI18n('vxe.error.treeDragChild')
|
|
446
|
+
})
|
|
447
|
+
}
|
|
448
|
+
return
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
} else if (dragColumn.parentId) {
|
|
453
|
+
// 子到根
|
|
454
|
+
|
|
455
|
+
if (!isCrossDrag) {
|
|
456
|
+
return
|
|
457
|
+
}
|
|
458
|
+
} else if (newColumn.parentId) {
|
|
459
|
+
// 根到子
|
|
460
|
+
|
|
461
|
+
if (!isCrossDrag) {
|
|
462
|
+
return
|
|
463
|
+
}
|
|
464
|
+
if (oldAllMaps[newColumn.id]) {
|
|
465
|
+
isSelfToChildStatus = true
|
|
466
|
+
if (!(isCrossDrag && isSelfToChildDrag)) {
|
|
467
|
+
if (VxeUI.modal) {
|
|
468
|
+
VxeUI.modal.message({
|
|
469
|
+
status: 'error',
|
|
470
|
+
content: getI18n('vxe.error.treeDragChild')
|
|
471
|
+
})
|
|
472
|
+
}
|
|
473
|
+
return
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
} else {
|
|
477
|
+
// 根到根
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
const oldewMatchRest = XEUtils.findTree(collectColumn, (item) => item.id === dragColumn.id)
|
|
481
|
+
|
|
482
|
+
// 改变层级
|
|
483
|
+
if (isSelfToChildStatus && isCrossDrag && isSelfToChildDrag) {
|
|
484
|
+
if (oldewMatchRest) {
|
|
485
|
+
const { items: oCols, index: oIndex } = oldewMatchRest
|
|
486
|
+
const childList = dragColumn.children || []
|
|
487
|
+
childList.forEach((column) => {
|
|
488
|
+
column.parentId = dragColumn.parentId
|
|
489
|
+
})
|
|
490
|
+
oCols.splice(oIndex, 1, ...childList)
|
|
491
|
+
dragColumn.children = []
|
|
492
|
+
}
|
|
493
|
+
} else {
|
|
494
|
+
if (oldewMatchRest) {
|
|
495
|
+
const { items: oCols, index: oIndex, parent: oParent } = oldewMatchRest
|
|
496
|
+
oCols.splice(oIndex, 1)
|
|
497
|
+
if (!oParent) {
|
|
498
|
+
oafIndex = oIndex
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
const newMatchRest = XEUtils.findTree(collectColumn, (item) => item.id === newColumn.id)
|
|
504
|
+
if (newMatchRest) {
|
|
505
|
+
const { items: nCols, index: nIndex, parent: nParent } = newMatchRest
|
|
506
|
+
// 转子级
|
|
507
|
+
if (isCrossDrag && isToChildDrag && prevDragToChild) {
|
|
508
|
+
dragColumn.parentId = newColumn.id
|
|
509
|
+
newColumn.children = (newColumn.children || []).concat([dragColumn])
|
|
510
|
+
} else {
|
|
511
|
+
dragColumn.parentId = newColumn.parentId
|
|
512
|
+
nCols.splice(nIndex + dragOffsetIndex, 0, dragColumn)
|
|
513
|
+
}
|
|
514
|
+
if (!nParent) {
|
|
515
|
+
nafIndex = nIndex
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
XEUtils.eachTree(collectColumn, (column, index, items, path, parentItem) => {
|
|
520
|
+
if (!parentItem) {
|
|
521
|
+
const sortIndex = index + 1
|
|
522
|
+
column.renderSortNumber = sortIndex
|
|
523
|
+
}
|
|
524
|
+
})
|
|
525
|
+
} else {
|
|
526
|
+
oafIndex = XEUtils.findIndexOf(customColumnList, (item) => item.id === dragColumn.id)
|
|
527
|
+
customColumnList.splice(oafIndex, 1)
|
|
528
|
+
|
|
529
|
+
nafIndex = XEUtils.findIndexOf(customColumnList, (item) => item.id === newColumn.id)
|
|
530
|
+
customColumnList.splice(nafIndex + dragOffsetIndex, 0, dragColumn)
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
if (hasEnableConf(mouseConfig, mouseOpts)) {
|
|
534
|
+
if ($xeTable.clearSelected) {
|
|
535
|
+
$xeTable.clearSelected()
|
|
536
|
+
}
|
|
537
|
+
if ($xeTable.clearCellAreas) {
|
|
538
|
+
$xeTable.clearCellAreas()
|
|
539
|
+
$xeTable.clearCopyCellArea()
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
const csParams = {
|
|
544
|
+
oldColumn: dragColumn,
|
|
545
|
+
newColumn,
|
|
546
|
+
dragColumn,
|
|
547
|
+
dragPos: prevDragPos,
|
|
548
|
+
offsetIndex: dragOffsetIndex,
|
|
549
|
+
_index: {
|
|
550
|
+
newIndex: nafIndex,
|
|
551
|
+
oldIndex: oafIndex
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
$xeTable.dispatchEvent('custom-sort-change', csParams, evnt)
|
|
555
|
+
$xeTable.dispatchEvent('column-dragend', csParams, evnt)
|
|
556
|
+
|
|
557
|
+
if (immediate) {
|
|
558
|
+
tableReactData.customColumnList = collectColumn.slice(0)
|
|
559
|
+
$xeTable.handleColDragSwapColumn()
|
|
560
|
+
}
|
|
561
|
+
clearDragAnimateStatus()
|
|
562
|
+
})
|
|
563
|
+
.catch(() => {})
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
hideDropTip()
|
|
568
|
+
customPanelReactData.dragCol = null
|
|
569
|
+
customPanelReactData.dragGroupField = null
|
|
570
|
+
customPanelReactData.dragAggFnCol = null
|
|
571
|
+
customPanelInternalData.prevDragGroupField = null
|
|
572
|
+
customPanelInternalData.prevDragAggFnColid = null
|
|
573
|
+
trEl.draggable = false
|
|
574
|
+
trEl.removeAttribute('drag-pos')
|
|
575
|
+
removeClass(trEl, 'active--drag-target')
|
|
576
|
+
removeClass(trEl, 'active--drag-origin')
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
const sortDragoverEvent = (evnt: DragEvent) => {
|
|
580
|
+
const customOpts = computeCustomOpts.value
|
|
581
|
+
const { showSortDragButton, allowSort, immediate } = customOpts
|
|
582
|
+
const columnDragOpts = computeColumnDragOpts.value
|
|
583
|
+
const { isCrossDrag, isPeerDrag, isToChildDrag } = columnDragOpts
|
|
584
|
+
const optEl = evnt.currentTarget as HTMLElement
|
|
585
|
+
const isControlKey = hasControlKey(evnt)
|
|
586
|
+
const colid = optEl.getAttribute('colid')
|
|
587
|
+
const column = $xeTable.getColumnById(colid)
|
|
588
|
+
const { dragCol } = customPanelReactData
|
|
589
|
+
customPanelInternalData.prevDragGroupField = null
|
|
590
|
+
customPanelInternalData.prevDragAggFnColid = null
|
|
591
|
+
// 是否移入有效列
|
|
592
|
+
if (column && (isCrossDrag || isPeerDrag || column.level === 1)) {
|
|
593
|
+
evnt.preventDefault()
|
|
594
|
+
const offsetY = evnt.clientY - optEl.getBoundingClientRect().y
|
|
595
|
+
const dragPos = offsetY < optEl.clientHeight / 2 ? 'top' : 'bottom'
|
|
596
|
+
if (
|
|
597
|
+
!dragCol ||
|
|
598
|
+
!(showSortDragButton && allowSort) ||
|
|
599
|
+
(dragCol && dragCol.id === column.id) ||
|
|
600
|
+
(!isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : column.level > 1)) ||
|
|
601
|
+
(!immediate && column.level > 1) ||
|
|
602
|
+
(!isCrossDrag && (isPeerDrag ? dragCol.parentId !== column.parentId : dragCol.level > 1)) ||
|
|
603
|
+
(!immediate && dragCol.level > 1)
|
|
604
|
+
) {
|
|
605
|
+
showDropTip(evnt, optEl, false, dragPos)
|
|
606
|
+
return
|
|
607
|
+
}
|
|
608
|
+
customPanelInternalData.prevDragToChild = !!(isCrossDrag && isToChildDrag && isControlKey && immediate)
|
|
609
|
+
customPanelInternalData.prevDragCol = column
|
|
610
|
+
customPanelInternalData.prevDragPos = dragPos
|
|
611
|
+
showDropTip(evnt, optEl, true, dragPos)
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
const clearDragAnimateStatus = () => {
|
|
616
|
+
customPanelInternalData.customDragTime = setTimeout(() => {
|
|
617
|
+
tableReactData.isCustomDragStatus = false
|
|
618
|
+
customPanelInternalData.customDragTime = undefined
|
|
619
|
+
}, 350)
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
const sortMoveUpEvent = (evntParame: VxeButtonDefines.ClickEventParams, column: VxeTableDefines.ColumnInfo) => {
|
|
623
|
+
const { customColumnList } = tableReactData
|
|
624
|
+
const matchObj = XEUtils.findTree(customColumnList, (item) => item === column)
|
|
625
|
+
if (matchObj) {
|
|
626
|
+
const { item, items, index } = matchObj
|
|
627
|
+
if (index > 0) {
|
|
628
|
+
tableReactData.isCustomDragStatus = true
|
|
629
|
+
nextTick(() => {
|
|
630
|
+
items.splice(index, 1)
|
|
631
|
+
items.splice(index - 1, 0, item)
|
|
632
|
+
clearDragAnimateStatus()
|
|
633
|
+
})
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
const sortMoveDnEvent = (evntParame: VxeButtonDefines.ClickEventParams, column: VxeTableDefines.ColumnInfo) => {
|
|
639
|
+
const { customColumnList } = tableReactData
|
|
640
|
+
const matchObj = XEUtils.findTree(customColumnList, (item) => item === column)
|
|
641
|
+
if (matchObj) {
|
|
642
|
+
const { item, items, index } = matchObj
|
|
643
|
+
if (index < items.length - 1) {
|
|
644
|
+
tableReactData.isCustomDragStatus = true
|
|
645
|
+
nextTick(() => {
|
|
646
|
+
items.splice(index, 1)
|
|
647
|
+
items.splice(index + 1, 0, item)
|
|
648
|
+
clearDragAnimateStatus()
|
|
649
|
+
})
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
const sortMoveTopEvent = (evntParame: VxeButtonDefines.ClickEventParams, column: VxeTableDefines.ColumnInfo) => {
|
|
655
|
+
const { customColumnList } = tableReactData
|
|
656
|
+
const matchObj = XEUtils.findTree(customColumnList, (item) => item === column)
|
|
657
|
+
if (matchObj) {
|
|
658
|
+
const { item, items, index, parent: parentItem } = matchObj
|
|
659
|
+
if (parentItem || index > 0) {
|
|
660
|
+
tableReactData.isCustomDragStatus = true
|
|
661
|
+
nextTick(() => {
|
|
662
|
+
item.parentId = null
|
|
663
|
+
items.splice(index, 1)
|
|
664
|
+
customColumnList.unshift(item)
|
|
665
|
+
clearDragAnimateStatus()
|
|
666
|
+
})
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
const sortMoveBottomEvent = (evntParame: VxeButtonDefines.ClickEventParams, column: VxeTableDefines.ColumnInfo) => {
|
|
672
|
+
const { customColumnList } = tableReactData
|
|
673
|
+
const matchObj = XEUtils.findTree(customColumnList, (item) => item === column)
|
|
674
|
+
if (matchObj) {
|
|
675
|
+
const { item, items, index, parent: parentItem } = matchObj
|
|
676
|
+
if (parentItem || index < items.length - 1) {
|
|
677
|
+
tableReactData.isCustomDragStatus = true
|
|
678
|
+
nextTick(() => {
|
|
679
|
+
item.parentId = null
|
|
680
|
+
items.splice(index, 1)
|
|
681
|
+
customColumnList.push(item)
|
|
682
|
+
clearDragAnimateStatus()
|
|
683
|
+
})
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
const renderDragTip = () => {
|
|
689
|
+
const { dragTipText } = customPanelReactData
|
|
690
|
+
const columnDragOpts = computeColumnDragOpts.value
|
|
691
|
+
return h('div', {}, [
|
|
692
|
+
h('div', {
|
|
693
|
+
ref: refDragLineElem,
|
|
694
|
+
class: [
|
|
695
|
+
'vxe-table-custom-popup--drag-line',
|
|
696
|
+
{
|
|
697
|
+
'is--guides': columnDragOpts.showGuidesStatus
|
|
698
|
+
}
|
|
699
|
+
]
|
|
700
|
+
}),
|
|
701
|
+
h(
|
|
702
|
+
'div',
|
|
703
|
+
{
|
|
704
|
+
ref: refDragTipElem,
|
|
705
|
+
class: 'vxe-table-custom-popup--drag-tip'
|
|
706
|
+
},
|
|
707
|
+
[
|
|
708
|
+
h(
|
|
709
|
+
'div',
|
|
710
|
+
{
|
|
711
|
+
class: 'vxe-table-custom-popup--drag-tip-wrapper'
|
|
712
|
+
},
|
|
713
|
+
[
|
|
714
|
+
h(
|
|
715
|
+
'div',
|
|
716
|
+
{
|
|
717
|
+
class: 'vxe-table-custom-popup--drag-tip-status'
|
|
718
|
+
},
|
|
719
|
+
[
|
|
720
|
+
h('span', {
|
|
721
|
+
class: ['vxe-table-custom-popup--drag-tip-normal-status', getIcon().TABLE_DRAG_STATUS_ROW]
|
|
722
|
+
}),
|
|
723
|
+
h('span', {
|
|
724
|
+
class: ['vxe-table-custom-popup--drag-tip-sub-status', getIcon().TABLE_DRAG_STATUS_SUB_ROW]
|
|
725
|
+
}),
|
|
726
|
+
h('span', {
|
|
727
|
+
class: ['vxe-table-custom-popup--drag-tip-group-status', getIcon().TABLE_DRAG_STATUS_AGG_GROUP]
|
|
728
|
+
}),
|
|
729
|
+
h('span', {
|
|
730
|
+
class: ['vxe-table-custom-popup--drag-tip-values-status', getIcon().TABLE_DRAG_STATUS_AGG_VALUES]
|
|
731
|
+
}),
|
|
732
|
+
h('span', {
|
|
733
|
+
class: ['vxe-table-custom-popup--drag-tip-disabled-status', getIcon().TABLE_DRAG_DISABLED]
|
|
734
|
+
})
|
|
735
|
+
]
|
|
736
|
+
),
|
|
737
|
+
h(
|
|
738
|
+
'div',
|
|
739
|
+
{
|
|
740
|
+
class: 'vxe-table-custom-popup--drag-tip-content'
|
|
741
|
+
},
|
|
742
|
+
`${dragTipText || ''}`
|
|
743
|
+
)
|
|
744
|
+
]
|
|
745
|
+
)
|
|
746
|
+
]
|
|
747
|
+
)
|
|
748
|
+
])
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
const renderSimplePanel = () => {
|
|
752
|
+
const $xeGrid = $xeTable.xeGrid
|
|
753
|
+
const $xeGantt = $xeTable.xeGantt
|
|
754
|
+
const tableProps = $xeTable.props
|
|
755
|
+
|
|
756
|
+
const { customStore } = props
|
|
757
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps
|
|
758
|
+
const { isCustomStatus, customColumnList, isCustomDragStatus } = tableReactData
|
|
759
|
+
const customOpts = computeCustomOpts.value
|
|
760
|
+
const columnDragOpts = computeColumnDragOpts.value
|
|
761
|
+
const { defPopupStyle } = customStore
|
|
762
|
+
const { immediate, checkMethod, visibleMethod, allowVisible, allowSort, allowFixed, allowGroup, allowValues, trigger, placement, showSortDragButton, showSortMoveButton, showSortPutButton } = customOpts
|
|
763
|
+
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
764
|
+
const vSize = computeSize.value
|
|
765
|
+
const { isCrossDrag, isPeerDrag } = columnDragOpts
|
|
766
|
+
const slots = customOpts.slots || {}
|
|
767
|
+
const headerSlot = slots.header
|
|
768
|
+
const topSlot = slots.top
|
|
769
|
+
const bottomSlot = slots.bottom
|
|
770
|
+
const defaultSlot = slots.default
|
|
771
|
+
const footerSlot = slots.footer
|
|
772
|
+
const colVNs: VNode[] = []
|
|
773
|
+
const customWrapperOns: any = {}
|
|
774
|
+
const isAllChecked = customStore.isAll
|
|
775
|
+
const isAllIndeterminate = customStore.isIndeterminate
|
|
776
|
+
// hover 触发
|
|
777
|
+
if (trigger === 'hover') {
|
|
778
|
+
customWrapperOns.onMouseenter = handleWrapperMouseenterEvent
|
|
779
|
+
customWrapperOns.onMouseleave = handleWrapperMouseleaveEvent
|
|
780
|
+
}
|
|
781
|
+
const params = {
|
|
782
|
+
$table: $xeTable,
|
|
783
|
+
$grid: $xeGrid,
|
|
784
|
+
$gantt: $xeGantt,
|
|
785
|
+
columns: customColumnList,
|
|
786
|
+
isAllChecked,
|
|
787
|
+
isAllIndeterminate,
|
|
788
|
+
isCustomStatus
|
|
789
|
+
}
|
|
790
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
791
|
+
const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true
|
|
792
|
+
if (isVisible) {
|
|
793
|
+
const isChecked = column.renderVisible
|
|
794
|
+
const isIndeterminate = column.halfVisible
|
|
795
|
+
const isColGroup = column.children && column.children.length
|
|
796
|
+
const colTitle = formatText(column.getTitle(), 1)
|
|
797
|
+
const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false
|
|
798
|
+
const isHidden = !isChecked
|
|
799
|
+
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1
|
|
800
|
+
colVNs.push(
|
|
801
|
+
h(
|
|
802
|
+
'li',
|
|
803
|
+
{
|
|
804
|
+
key: column.id,
|
|
805
|
+
colid: column.id,
|
|
806
|
+
class: [
|
|
807
|
+
'vxe-table-custom--option',
|
|
808
|
+
`level--${column.level}`,
|
|
809
|
+
{
|
|
810
|
+
'is--hidden': isDisabled || isHidden,
|
|
811
|
+
'is--group': isColGroup
|
|
812
|
+
}
|
|
813
|
+
],
|
|
814
|
+
onDragstart: sortDragstartEvent,
|
|
815
|
+
onDragend: sortDragendEvent,
|
|
816
|
+
onDragover: sortDragoverEvent
|
|
817
|
+
},
|
|
818
|
+
[
|
|
819
|
+
allowVisible
|
|
820
|
+
? h(
|
|
821
|
+
'div',
|
|
822
|
+
{
|
|
823
|
+
class: [
|
|
824
|
+
'vxe-table-custom--checkbox-option',
|
|
825
|
+
{
|
|
826
|
+
'is--checked': isChecked,
|
|
827
|
+
'is--indeterminate': isIndeterminate,
|
|
828
|
+
'is--disabled': isDisabled
|
|
829
|
+
}
|
|
830
|
+
],
|
|
831
|
+
title: getI18n('vxe.custom.setting.colVisible'),
|
|
832
|
+
onClick: (evnt: MouseEvent) => {
|
|
833
|
+
if (!isDisabled) {
|
|
834
|
+
changeCheckboxOption(column, evnt)
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
[
|
|
839
|
+
h('span', {
|
|
840
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
841
|
+
})
|
|
842
|
+
]
|
|
843
|
+
)
|
|
844
|
+
: renderEmptyElement($xeTable),
|
|
845
|
+
h(
|
|
846
|
+
'div',
|
|
847
|
+
{
|
|
848
|
+
class: 'vxe-table-custom--name-option'
|
|
849
|
+
},
|
|
850
|
+
[
|
|
851
|
+
(allowSort && showSortDragButton) || allowGroup || allowValues
|
|
852
|
+
? showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
853
|
+
? h(
|
|
854
|
+
'div',
|
|
855
|
+
{
|
|
856
|
+
class: 'vxe-table-custom--sort-option'
|
|
857
|
+
},
|
|
858
|
+
[
|
|
859
|
+
h(
|
|
860
|
+
'span',
|
|
861
|
+
{
|
|
862
|
+
class: [
|
|
863
|
+
'vxe-table-custom--sort-btn',
|
|
864
|
+
{
|
|
865
|
+
'is--disabled': isHidden
|
|
866
|
+
}
|
|
867
|
+
],
|
|
868
|
+
title: getI18n('vxe.custom.setting.sortHelpTip'),
|
|
869
|
+
...(isHidden
|
|
870
|
+
? {}
|
|
871
|
+
: {
|
|
872
|
+
onMousedown: sortMousedownEvent,
|
|
873
|
+
onMouseup: sortMouseupEvent
|
|
874
|
+
})
|
|
875
|
+
},
|
|
876
|
+
[
|
|
877
|
+
h('i', {
|
|
878
|
+
class: getIcon().TABLE_CUSTOM_SORT
|
|
879
|
+
})
|
|
880
|
+
]
|
|
881
|
+
)
|
|
882
|
+
]
|
|
883
|
+
)
|
|
884
|
+
: renderEmptyElement($xeTable)
|
|
885
|
+
: renderEmptyElement($xeTable),
|
|
886
|
+
column.type === 'html'
|
|
887
|
+
? h('div', {
|
|
888
|
+
key: '1',
|
|
889
|
+
class: 'vxe-table-custom--checkbox-label',
|
|
890
|
+
innerHTML: colTitle
|
|
891
|
+
})
|
|
892
|
+
: h(
|
|
893
|
+
'div',
|
|
894
|
+
{
|
|
895
|
+
key: '0',
|
|
896
|
+
class: 'vxe-table-custom--checkbox-label'
|
|
897
|
+
},
|
|
898
|
+
colTitle
|
|
899
|
+
)
|
|
900
|
+
]
|
|
901
|
+
),
|
|
902
|
+
showSortBtn && (showSortMoveButton || showSortPutButton)
|
|
903
|
+
? h(
|
|
904
|
+
'div',
|
|
905
|
+
{
|
|
906
|
+
class: 'vxe-table-custom--move-btn-option'
|
|
907
|
+
},
|
|
908
|
+
VxeUIButtonComponent
|
|
909
|
+
? [
|
|
910
|
+
showSortMoveButton
|
|
911
|
+
? h(VxeUIButtonComponent, {
|
|
912
|
+
mode: 'text',
|
|
913
|
+
icon: 'vxe-icon-arrows-up',
|
|
914
|
+
title: getI18n('vxe.custom.setting.moveUpTitle'),
|
|
915
|
+
disabled: index <= 0,
|
|
916
|
+
onClick(evntParame) {
|
|
917
|
+
sortMoveUpEvent(evntParame, column)
|
|
918
|
+
}
|
|
919
|
+
})
|
|
920
|
+
: renderEmptyElement($xeTable),
|
|
921
|
+
showSortMoveButton
|
|
922
|
+
? h(VxeUIButtonComponent, {
|
|
923
|
+
mode: 'text',
|
|
924
|
+
icon: 'vxe-icon-arrows-down',
|
|
925
|
+
title: getI18n('vxe.custom.setting.moveDnTitle'),
|
|
926
|
+
disabled: index >= items.length - 1,
|
|
927
|
+
onClick(evntParame) {
|
|
928
|
+
sortMoveDnEvent(evntParame, column)
|
|
929
|
+
}
|
|
930
|
+
})
|
|
931
|
+
: renderEmptyElement($xeTable),
|
|
932
|
+
showSortPutButton && !parentItem
|
|
933
|
+
? h(VxeUIButtonComponent, {
|
|
934
|
+
mode: 'text',
|
|
935
|
+
icon: 'vxe-icon-top',
|
|
936
|
+
title: getI18n('vxe.custom.setting.putTopTitle'),
|
|
937
|
+
disabled: index <= 0,
|
|
938
|
+
onClick(evntParame) {
|
|
939
|
+
sortMoveTopEvent(evntParame, column)
|
|
940
|
+
}
|
|
941
|
+
})
|
|
942
|
+
: renderEmptyElement($xeTable),
|
|
943
|
+
showSortPutButton && !parentItem
|
|
944
|
+
? h(VxeUIButtonComponent, {
|
|
945
|
+
mode: 'text',
|
|
946
|
+
icon: 'vxe-icon-bottom',
|
|
947
|
+
title: getI18n('vxe.custom.setting.putBottomTitle'),
|
|
948
|
+
disabled: index >= items.length - 1,
|
|
949
|
+
onClick(evntParame) {
|
|
950
|
+
sortMoveBottomEvent(evntParame, column)
|
|
951
|
+
}
|
|
952
|
+
})
|
|
953
|
+
: renderEmptyElement($xeTable)
|
|
954
|
+
]
|
|
955
|
+
: []
|
|
956
|
+
)
|
|
957
|
+
: renderEmptyElement($xeTable),
|
|
958
|
+
!parentItem && allowFixed
|
|
959
|
+
? h(
|
|
960
|
+
'div',
|
|
961
|
+
{
|
|
962
|
+
class: 'vxe-table-custom--fixed-option'
|
|
963
|
+
},
|
|
964
|
+
VxeUIButtonComponent
|
|
965
|
+
? [
|
|
966
|
+
h(VxeUIButtonComponent, {
|
|
967
|
+
mode: 'text',
|
|
968
|
+
icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
969
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
970
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
971
|
+
title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
|
|
972
|
+
onClick: ({ $event }) => {
|
|
973
|
+
changeFixedOption(column, 'left', $event)
|
|
974
|
+
}
|
|
975
|
+
}),
|
|
976
|
+
h(VxeUIButtonComponent, {
|
|
977
|
+
mode: 'text',
|
|
978
|
+
icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
979
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
980
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
981
|
+
title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
|
|
982
|
+
onClick: ({ $event }) => {
|
|
983
|
+
changeFixedOption(column, 'right', $event)
|
|
984
|
+
}
|
|
985
|
+
})
|
|
986
|
+
]
|
|
987
|
+
: []
|
|
988
|
+
)
|
|
989
|
+
: renderEmptyElement($xeTable)
|
|
990
|
+
]
|
|
991
|
+
)
|
|
992
|
+
)
|
|
993
|
+
}
|
|
994
|
+
})
|
|
995
|
+
return h(
|
|
996
|
+
'div',
|
|
997
|
+
{
|
|
998
|
+
ref: refElem,
|
|
999
|
+
key: 'simple',
|
|
1000
|
+
class: [
|
|
1001
|
+
'vxe-table-custom-wrapper',
|
|
1002
|
+
`placement--${placement}`,
|
|
1003
|
+
{
|
|
1004
|
+
[`size--${vSize}`]: vSize,
|
|
1005
|
+
'is--active': customStore.visible
|
|
1006
|
+
}
|
|
1007
|
+
],
|
|
1008
|
+
style: defPopupStyle
|
|
1009
|
+
},
|
|
1010
|
+
customStore.visible
|
|
1011
|
+
? [
|
|
1012
|
+
h(
|
|
1013
|
+
'div',
|
|
1014
|
+
{
|
|
1015
|
+
ref: refBodyWrapperElem,
|
|
1016
|
+
class: 'vxe-table-custom-simple--body-wrapper'
|
|
1017
|
+
},
|
|
1018
|
+
[
|
|
1019
|
+
!treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregateSimplePanel
|
|
1020
|
+
? h($xeTable.getPivotTableAggregateSimplePanel(), {
|
|
1021
|
+
customStore
|
|
1022
|
+
})
|
|
1023
|
+
: renderEmptyElement($xeTable),
|
|
1024
|
+
h(
|
|
1025
|
+
'div',
|
|
1026
|
+
{
|
|
1027
|
+
ref: refCustomBodyElem,
|
|
1028
|
+
class: 'vxe-table-custom--handle-wrapper'
|
|
1029
|
+
},
|
|
1030
|
+
[
|
|
1031
|
+
h(
|
|
1032
|
+
'div',
|
|
1033
|
+
{
|
|
1034
|
+
class: 'vxe-table-custom--header'
|
|
1035
|
+
},
|
|
1036
|
+
headerSlot
|
|
1037
|
+
? $xeTable.callSlot(headerSlot, params)
|
|
1038
|
+
: [
|
|
1039
|
+
h(
|
|
1040
|
+
'ul',
|
|
1041
|
+
{
|
|
1042
|
+
class: 'vxe-table-custom--panel-list'
|
|
1043
|
+
},
|
|
1044
|
+
[
|
|
1045
|
+
h(
|
|
1046
|
+
'li',
|
|
1047
|
+
{
|
|
1048
|
+
class: 'vxe-table-custom--option'
|
|
1049
|
+
},
|
|
1050
|
+
[
|
|
1051
|
+
allowVisible
|
|
1052
|
+
? h(
|
|
1053
|
+
'div',
|
|
1054
|
+
{
|
|
1055
|
+
class: [
|
|
1056
|
+
'vxe-table-custom--checkbox-option',
|
|
1057
|
+
{
|
|
1058
|
+
'is--checked': isAllChecked,
|
|
1059
|
+
'is--indeterminate': isAllIndeterminate
|
|
1060
|
+
}
|
|
1061
|
+
],
|
|
1062
|
+
title: getI18n('vxe.table.allTitle'),
|
|
1063
|
+
onClick: allOptionEvent
|
|
1064
|
+
},
|
|
1065
|
+
[
|
|
1066
|
+
h('span', {
|
|
1067
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
1068
|
+
}),
|
|
1069
|
+
h(
|
|
1070
|
+
'span',
|
|
1071
|
+
{
|
|
1072
|
+
class: 'vxe-checkbox--label'
|
|
1073
|
+
},
|
|
1074
|
+
getI18n('vxe.toolbar.customAll')
|
|
1075
|
+
)
|
|
1076
|
+
]
|
|
1077
|
+
)
|
|
1078
|
+
: h(
|
|
1079
|
+
'span',
|
|
1080
|
+
{
|
|
1081
|
+
class: 'vxe-checkbox--label'
|
|
1082
|
+
},
|
|
1083
|
+
getI18n('vxe.table.customTitle')
|
|
1084
|
+
)
|
|
1085
|
+
]
|
|
1086
|
+
)
|
|
1087
|
+
]
|
|
1088
|
+
)
|
|
1089
|
+
]
|
|
1090
|
+
),
|
|
1091
|
+
h(
|
|
1092
|
+
'div',
|
|
1093
|
+
{
|
|
1094
|
+
class: 'vxe-table-custom--body'
|
|
1095
|
+
},
|
|
1096
|
+
[
|
|
1097
|
+
topSlot
|
|
1098
|
+
? h(
|
|
1099
|
+
'div',
|
|
1100
|
+
{
|
|
1101
|
+
class: 'vxe-table-custom--panel-top'
|
|
1102
|
+
},
|
|
1103
|
+
$xeTable.callSlot(topSlot, params)
|
|
1104
|
+
)
|
|
1105
|
+
: renderEmptyElement($xeTable),
|
|
1106
|
+
defaultSlot
|
|
1107
|
+
? h(
|
|
1108
|
+
'div',
|
|
1109
|
+
{
|
|
1110
|
+
class: 'vxe-table-custom--panel-body'
|
|
1111
|
+
},
|
|
1112
|
+
$xeTable.callSlot(defaultSlot, params)
|
|
1113
|
+
)
|
|
1114
|
+
: h(
|
|
1115
|
+
TransitionGroup,
|
|
1116
|
+
{
|
|
1117
|
+
class: 'vxe-table-custom--panel-list',
|
|
1118
|
+
name: isCustomDragStatus ? 'vxe-table-custom--list' : '',
|
|
1119
|
+
tag: 'ul',
|
|
1120
|
+
...customWrapperOns
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
default: () => colVNs
|
|
1124
|
+
}
|
|
1125
|
+
),
|
|
1126
|
+
bottomSlot
|
|
1127
|
+
? h(
|
|
1128
|
+
'div',
|
|
1129
|
+
{
|
|
1130
|
+
class: 'vxe-table-custom--panel-bottom'
|
|
1131
|
+
},
|
|
1132
|
+
$xeTable.callSlot(bottomSlot, params)
|
|
1133
|
+
)
|
|
1134
|
+
: renderEmptyElement($xeTable)
|
|
1135
|
+
]
|
|
1136
|
+
),
|
|
1137
|
+
customOpts.showFooter
|
|
1138
|
+
? h(
|
|
1139
|
+
'div',
|
|
1140
|
+
{
|
|
1141
|
+
class: 'vxe-table-custom--footer'
|
|
1142
|
+
},
|
|
1143
|
+
footerSlot
|
|
1144
|
+
? $xeTable.callSlot(footerSlot, params)
|
|
1145
|
+
: [
|
|
1146
|
+
h(
|
|
1147
|
+
'div',
|
|
1148
|
+
{
|
|
1149
|
+
class: 'vxe-table-custom--footer-buttons'
|
|
1150
|
+
},
|
|
1151
|
+
[
|
|
1152
|
+
VxeUIButtonComponent
|
|
1153
|
+
? h(VxeUIButtonComponent, {
|
|
1154
|
+
mode: 'text',
|
|
1155
|
+
content: customOpts.resetButtonText || getI18n('vxe.table.customRestore'),
|
|
1156
|
+
disabled: !isCustomStatus,
|
|
1157
|
+
onClick: resetCustomEvent
|
|
1158
|
+
})
|
|
1159
|
+
: renderEmptyElement($xeTable),
|
|
1160
|
+
immediate
|
|
1161
|
+
? VxeUIButtonComponent
|
|
1162
|
+
? h(VxeUIButtonComponent, {
|
|
1163
|
+
mode: 'text',
|
|
1164
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
1165
|
+
onClick: cancelCloseEvent
|
|
1166
|
+
})
|
|
1167
|
+
: renderEmptyElement($xeTable)
|
|
1168
|
+
: VxeUIButtonComponent
|
|
1169
|
+
? h(VxeUIButtonComponent, {
|
|
1170
|
+
mode: 'text',
|
|
1171
|
+
content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
|
|
1172
|
+
onClick: cancelCustomEvent
|
|
1173
|
+
})
|
|
1174
|
+
: renderEmptyElement($xeTable),
|
|
1175
|
+
immediate
|
|
1176
|
+
? renderEmptyElement($xeTable)
|
|
1177
|
+
: VxeUIButtonComponent
|
|
1178
|
+
? h(VxeUIButtonComponent, {
|
|
1179
|
+
mode: 'text',
|
|
1180
|
+
status: 'primary',
|
|
1181
|
+
content: customOpts.confirmButtonText || getI18n('vxe.table.customConfirm'),
|
|
1182
|
+
onClick: confirmCustomEvent
|
|
1183
|
+
})
|
|
1184
|
+
: renderEmptyElement($xeTable)
|
|
1185
|
+
]
|
|
1186
|
+
)
|
|
1187
|
+
]
|
|
1188
|
+
)
|
|
1189
|
+
: null
|
|
1190
|
+
]
|
|
1191
|
+
),
|
|
1192
|
+
renderDragTip()
|
|
1193
|
+
]
|
|
1194
|
+
)
|
|
1195
|
+
]
|
|
1196
|
+
: []
|
|
1197
|
+
)
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
const renderPopupBodys = () => {
|
|
1201
|
+
const { resizable: allResizable } = tableProps
|
|
1202
|
+
const { customColumnList } = tableReactData
|
|
1203
|
+
const customOpts = computeCustomOpts.value
|
|
1204
|
+
const columnDragOpts = computeColumnDragOpts.value
|
|
1205
|
+
const { immediate, showSortDragButton, showSortMoveButton, showSortPutButton, allowVisible, allowSort, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable, allowGroup, allowValues, checkMethod, visibleMethod } = customOpts
|
|
1206
|
+
const columnOpts = computeColumnOpts.value
|
|
1207
|
+
const resizableOpts = computeResizableOpts.value
|
|
1208
|
+
const { minWidth: reMinWidth, maxWidth: reMaxWidth } = resizableOpts
|
|
1209
|
+
const isMaxFixedColumn = computeIsMaxFixedColumn.value
|
|
1210
|
+
const { isCrossDrag, isPeerDrag } = columnDragOpts
|
|
1211
|
+
|
|
1212
|
+
const trVNs: VNode[] = []
|
|
1213
|
+
XEUtils.eachTree(customColumnList, (column, index, items, path, parentItem) => {
|
|
1214
|
+
const isVisible = visibleMethod ? visibleMethod({ $table: $xeTable, column }) : true
|
|
1215
|
+
if (isVisible) {
|
|
1216
|
+
// 默认继承调整宽度
|
|
1217
|
+
let customMinWidth = 0
|
|
1218
|
+
let customMaxWidth = 0
|
|
1219
|
+
if (allowResizable) {
|
|
1220
|
+
const resizeParams = {
|
|
1221
|
+
$table: $xeTable,
|
|
1222
|
+
column,
|
|
1223
|
+
columnIndex: $xeTable.getColumnIndex(column),
|
|
1224
|
+
$columnIndex: $xeTable.getVMColumnIndex(column),
|
|
1225
|
+
_columnIndex: $xeTable.getVTColumnIndex(column),
|
|
1226
|
+
rowIndex: -1,
|
|
1227
|
+
_rowIndex: -1,
|
|
1228
|
+
$rowIndex: -1
|
|
1229
|
+
}
|
|
1230
|
+
if (reMinWidth) {
|
|
1231
|
+
customMinWidth = XEUtils.toNumber(XEUtils.isFunction(reMinWidth) ? reMinWidth(resizeParams) : reMinWidth)
|
|
1232
|
+
}
|
|
1233
|
+
if (reMaxWidth) {
|
|
1234
|
+
customMaxWidth = XEUtils.toNumber(XEUtils.isFunction(reMaxWidth) ? reMaxWidth(resizeParams) : reMaxWidth)
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
const isChecked = column.renderVisible
|
|
1239
|
+
const isIndeterminate = column.halfVisible
|
|
1240
|
+
const colTitle = formatText(column.getTitle(), 1)
|
|
1241
|
+
const isColGroup = column.children && column.children.length
|
|
1242
|
+
const isDisabled = checkMethod ? !checkMethod({ $table: $xeTable, column }) : false
|
|
1243
|
+
const isHidden = !isChecked
|
|
1244
|
+
const showSortBtn = (isCrossDrag || isPeerDrag ? immediate : false) || column.level === 1
|
|
1245
|
+
|
|
1246
|
+
const alignList = [
|
|
1247
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_LEFT, value: 'left', title: getI18n('vxe.custom.setting.anLeftTitle'), disabled: isHidden },
|
|
1248
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_CENTER, value: 'center', title: getI18n('vxe.custom.setting.anCenterTitle'), disabled: isHidden },
|
|
1249
|
+
{ icon: getIcon().TABLE_CUSTOM_ALIGN_RIGHT, value: 'right', title: getI18n('vxe.custom.setting.anRightTitle'), disabled: isHidden }
|
|
1250
|
+
]
|
|
1251
|
+
|
|
1252
|
+
const tdVNs: VNode[] = []
|
|
1253
|
+
if (allowVisible) {
|
|
1254
|
+
tdVNs.push(
|
|
1255
|
+
h(
|
|
1256
|
+
'td',
|
|
1257
|
+
{
|
|
1258
|
+
key: 'av',
|
|
1259
|
+
class: 'vxe-table-custom-popup--column-td col--visible'
|
|
1260
|
+
},
|
|
1261
|
+
[
|
|
1262
|
+
h(
|
|
1263
|
+
'div',
|
|
1264
|
+
{
|
|
1265
|
+
class: [
|
|
1266
|
+
'vxe-table-custom--checkbox-option',
|
|
1267
|
+
{
|
|
1268
|
+
'is--checked': isChecked,
|
|
1269
|
+
'is--indeterminate': isIndeterminate,
|
|
1270
|
+
'is--disabled': isDisabled
|
|
1271
|
+
}
|
|
1272
|
+
],
|
|
1273
|
+
title: getI18n('vxe.custom.setting.colVisible'),
|
|
1274
|
+
onClick: (evnt: MouseEvent) => {
|
|
1275
|
+
if (!isDisabled) {
|
|
1276
|
+
changeCheckboxOption(column, evnt)
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
[
|
|
1281
|
+
h('span', {
|
|
1282
|
+
class: ['vxe-checkbox--icon', isIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
1283
|
+
})
|
|
1284
|
+
]
|
|
1285
|
+
)
|
|
1286
|
+
]
|
|
1287
|
+
)
|
|
1288
|
+
)
|
|
1289
|
+
}
|
|
1290
|
+
tdVNs.push(
|
|
1291
|
+
h(
|
|
1292
|
+
'td',
|
|
1293
|
+
{
|
|
1294
|
+
key: 'at',
|
|
1295
|
+
class: 'vxe-table-custom-popup--column-td col--name'
|
|
1296
|
+
},
|
|
1297
|
+
[
|
|
1298
|
+
h(
|
|
1299
|
+
'div',
|
|
1300
|
+
{
|
|
1301
|
+
class: 'vxe-table-custom-popup--name'
|
|
1302
|
+
},
|
|
1303
|
+
[
|
|
1304
|
+
(allowSort && showSortDragButton) || allowGroup || allowValues
|
|
1305
|
+
? showSortBtn || ((allowGroup || allowValues) && !isColGroup)
|
|
1306
|
+
? h(
|
|
1307
|
+
'div',
|
|
1308
|
+
{
|
|
1309
|
+
class: [
|
|
1310
|
+
'vxe-table-custom-popup--column-sort-btn',
|
|
1311
|
+
{
|
|
1312
|
+
'is--disabled': isHidden
|
|
1313
|
+
}
|
|
1314
|
+
],
|
|
1315
|
+
title: getI18n('vxe.custom.setting.sortHelpTip'),
|
|
1316
|
+
...(isHidden
|
|
1317
|
+
? {}
|
|
1318
|
+
: {
|
|
1319
|
+
onMousedown: sortMousedownEvent,
|
|
1320
|
+
onMouseup: sortMouseupEvent
|
|
1321
|
+
})
|
|
1322
|
+
},
|
|
1323
|
+
[
|
|
1324
|
+
h('i', {
|
|
1325
|
+
class: getIcon().TABLE_CUSTOM_SORT
|
|
1326
|
+
})
|
|
1327
|
+
]
|
|
1328
|
+
)
|
|
1329
|
+
: h('div', {
|
|
1330
|
+
class: 'vxe-table-custom-popup--column-sort-placeholder'
|
|
1331
|
+
})
|
|
1332
|
+
: renderEmptyElement($xeTable),
|
|
1333
|
+
column.type === 'html'
|
|
1334
|
+
? h('div', {
|
|
1335
|
+
key: '1',
|
|
1336
|
+
class: 'vxe-table-custom-popup--title',
|
|
1337
|
+
innerHTML: colTitle
|
|
1338
|
+
})
|
|
1339
|
+
: h(
|
|
1340
|
+
'div',
|
|
1341
|
+
{
|
|
1342
|
+
key: '0',
|
|
1343
|
+
class: 'vxe-table-custom-popup--title',
|
|
1344
|
+
title: colTitle
|
|
1345
|
+
},
|
|
1346
|
+
colTitle
|
|
1347
|
+
),
|
|
1348
|
+
showSortBtn && (showSortMoveButton || showSortPutButton)
|
|
1349
|
+
? h(
|
|
1350
|
+
'div',
|
|
1351
|
+
{
|
|
1352
|
+
class: 'vxe-table-custom-popup--move-btn'
|
|
1353
|
+
},
|
|
1354
|
+
VxeUIButtonComponent
|
|
1355
|
+
? [
|
|
1356
|
+
showSortMoveButton
|
|
1357
|
+
? h(VxeUIButtonComponent, {
|
|
1358
|
+
mode: 'text',
|
|
1359
|
+
icon: 'vxe-icon-arrows-up',
|
|
1360
|
+
title: getI18n('vxe.custom.setting.moveUpTitle'),
|
|
1361
|
+
disabled: index <= 0,
|
|
1362
|
+
onClick(evntParame) {
|
|
1363
|
+
sortMoveUpEvent(evntParame, column)
|
|
1364
|
+
}
|
|
1365
|
+
})
|
|
1366
|
+
: renderEmptyElement($xeTable),
|
|
1367
|
+
showSortMoveButton
|
|
1368
|
+
? h(VxeUIButtonComponent, {
|
|
1369
|
+
mode: 'text',
|
|
1370
|
+
icon: 'vxe-icon-arrows-down',
|
|
1371
|
+
title: getI18n('vxe.custom.setting.moveDnTitle'),
|
|
1372
|
+
disabled: index >= items.length - 1,
|
|
1373
|
+
onClick(evntParame) {
|
|
1374
|
+
sortMoveDnEvent(evntParame, column)
|
|
1375
|
+
}
|
|
1376
|
+
})
|
|
1377
|
+
: renderEmptyElement($xeTable),
|
|
1378
|
+
showSortPutButton && !parentItem
|
|
1379
|
+
? h(VxeUIButtonComponent, {
|
|
1380
|
+
mode: 'text',
|
|
1381
|
+
icon: 'vxe-icon-top',
|
|
1382
|
+
title: getI18n('vxe.custom.setting.putTopTitle'),
|
|
1383
|
+
disabled: index <= 0,
|
|
1384
|
+
onClick(evntParame) {
|
|
1385
|
+
sortMoveTopEvent(evntParame, column)
|
|
1386
|
+
}
|
|
1387
|
+
})
|
|
1388
|
+
: renderEmptyElement($xeTable),
|
|
1389
|
+
showSortPutButton && !parentItem
|
|
1390
|
+
? h(VxeUIButtonComponent, {
|
|
1391
|
+
mode: 'text',
|
|
1392
|
+
icon: 'vxe-icon-bottom',
|
|
1393
|
+
title: getI18n('vxe.custom.setting.putBottomTitle'),
|
|
1394
|
+
disabled: index >= items.length - 1,
|
|
1395
|
+
onClick(evntParame) {
|
|
1396
|
+
sortMoveBottomEvent(evntParame, column)
|
|
1397
|
+
}
|
|
1398
|
+
})
|
|
1399
|
+
: renderEmptyElement($xeTable)
|
|
1400
|
+
]
|
|
1401
|
+
: []
|
|
1402
|
+
)
|
|
1403
|
+
: renderEmptyElement($xeTable)
|
|
1404
|
+
]
|
|
1405
|
+
)
|
|
1406
|
+
]
|
|
1407
|
+
)
|
|
1408
|
+
)
|
|
1409
|
+
if (allowResizable) {
|
|
1410
|
+
tdVNs.push(
|
|
1411
|
+
h(
|
|
1412
|
+
'td',
|
|
1413
|
+
{
|
|
1414
|
+
key: 'aw',
|
|
1415
|
+
class: 'vxe-table-custom-popup--column-td col--resizable'
|
|
1416
|
+
},
|
|
1417
|
+
[
|
|
1418
|
+
(column.children && column.children.length) || !(XEUtils.isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable)
|
|
1419
|
+
? h('span', '-')
|
|
1420
|
+
: VxeUINumberInputComponent
|
|
1421
|
+
? h(VxeUINumberInputComponent, {
|
|
1422
|
+
type: 'integer',
|
|
1423
|
+
immediate: false,
|
|
1424
|
+
disabled: isHidden,
|
|
1425
|
+
modelValue: column.renderResizeWidth,
|
|
1426
|
+
min: customMinWidth || 0,
|
|
1427
|
+
max: customMaxWidth || 9999,
|
|
1428
|
+
'onUpdate:modelValue'(value: any) {
|
|
1429
|
+
const width = Math.max(0, Number(value))
|
|
1430
|
+
column.renderResizeWidth = width
|
|
1431
|
+
},
|
|
1432
|
+
onChange() {
|
|
1433
|
+
changeColumnWidth(column)
|
|
1434
|
+
}
|
|
1435
|
+
})
|
|
1436
|
+
: renderEmptyElement($xeTable)
|
|
1437
|
+
]
|
|
1438
|
+
)
|
|
1439
|
+
)
|
|
1440
|
+
}
|
|
1441
|
+
if (allowFixed) {
|
|
1442
|
+
tdVNs.push(
|
|
1443
|
+
h(
|
|
1444
|
+
'td',
|
|
1445
|
+
{
|
|
1446
|
+
key: 'af',
|
|
1447
|
+
class: 'vxe-table-custom-popup--column-td col--fixed'
|
|
1448
|
+
},
|
|
1449
|
+
parentItem
|
|
1450
|
+
? [h('span', '-')]
|
|
1451
|
+
: VxeUIRadioGroupComponent
|
|
1452
|
+
? [
|
|
1453
|
+
h(VxeUIButtonComponent, {
|
|
1454
|
+
icon: column.renderFixed === 'left' ? getIcon().TOOLBAR_TOOLS_FIXED_LEFT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_LEFT,
|
|
1455
|
+
status: column.renderFixed === 'left' ? 'primary' : '',
|
|
1456
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
1457
|
+
title: getI18n(column.renderFixed === 'left' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedLeft'),
|
|
1458
|
+
onClick: ({ $event }) => {
|
|
1459
|
+
changeFixedOption(column, 'left', $event)
|
|
1460
|
+
}
|
|
1461
|
+
}),
|
|
1462
|
+
h(VxeUIButtonComponent, {
|
|
1463
|
+
icon: column.renderFixed === 'right' ? getIcon().TOOLBAR_TOOLS_FIXED_RIGHT_ACTIVE : getIcon().TOOLBAR_TOOLS_FIXED_RIGHT,
|
|
1464
|
+
status: column.renderFixed === 'right' ? 'primary' : '',
|
|
1465
|
+
disabled: isHidden || (isMaxFixedColumn && !column.renderFixed),
|
|
1466
|
+
title: getI18n(column.renderFixed === 'right' ? 'vxe.toolbar.cancelFixed' : 'vxe.toolbar.fixedRight'),
|
|
1467
|
+
onClick: ({ $event }) => {
|
|
1468
|
+
changeFixedOption(column, 'right', $event)
|
|
1469
|
+
}
|
|
1470
|
+
})
|
|
1471
|
+
]
|
|
1472
|
+
: []
|
|
1473
|
+
)
|
|
1474
|
+
)
|
|
1475
|
+
}
|
|
1476
|
+
if (allowAlign) {
|
|
1477
|
+
tdVNs.push(
|
|
1478
|
+
h(
|
|
1479
|
+
'td',
|
|
1480
|
+
{
|
|
1481
|
+
key: 'aa',
|
|
1482
|
+
class: 'vxe-table-custom-popup--column-td col--align'
|
|
1483
|
+
},
|
|
1484
|
+
VxeUIRadioGroupComponent
|
|
1485
|
+
? [
|
|
1486
|
+
h(VxeUIRadioGroupComponent, {
|
|
1487
|
+
modelValue: column.renderAlign || 'left',
|
|
1488
|
+
type: 'button',
|
|
1489
|
+
strict: false,
|
|
1490
|
+
disabled: isHidden,
|
|
1491
|
+
options: alignList,
|
|
1492
|
+
onChange({ value, $event }) {
|
|
1493
|
+
changeAlignOption(column, value, 'align', 'renderAlign', 'custom-align-change', $event)
|
|
1494
|
+
}
|
|
1495
|
+
})
|
|
1496
|
+
]
|
|
1497
|
+
: []
|
|
1498
|
+
)
|
|
1499
|
+
)
|
|
1500
|
+
}
|
|
1501
|
+
if (allowHeaderAlign) {
|
|
1502
|
+
tdVNs.push(
|
|
1503
|
+
h(
|
|
1504
|
+
'td',
|
|
1505
|
+
{
|
|
1506
|
+
key: 'aha',
|
|
1507
|
+
class: 'vxe-table-custom-popup--column-td col--header-align'
|
|
1508
|
+
},
|
|
1509
|
+
isColGroup
|
|
1510
|
+
? [h('span', '-')]
|
|
1511
|
+
: VxeUIRadioGroupComponent
|
|
1512
|
+
? [
|
|
1513
|
+
h(VxeUIRadioGroupComponent, {
|
|
1514
|
+
modelValue: column.renderHeaderAlign || 'left',
|
|
1515
|
+
type: 'button',
|
|
1516
|
+
strict: false,
|
|
1517
|
+
disabled: isHidden,
|
|
1518
|
+
options: alignList,
|
|
1519
|
+
onChange({ value, $event }) {
|
|
1520
|
+
changeAlignOption(column, value, 'headerAlign', 'renderHeaderAlign', 'custom-header-align-change', $event)
|
|
1521
|
+
}
|
|
1522
|
+
})
|
|
1523
|
+
]
|
|
1524
|
+
: []
|
|
1525
|
+
)
|
|
1526
|
+
)
|
|
1527
|
+
}
|
|
1528
|
+
if (allowFooterAlign) {
|
|
1529
|
+
tdVNs.push(
|
|
1530
|
+
h(
|
|
1531
|
+
'td',
|
|
1532
|
+
{
|
|
1533
|
+
key: 'afa',
|
|
1534
|
+
class: 'vxe-table-custom-popup--column-td col--footer-align'
|
|
1535
|
+
},
|
|
1536
|
+
isColGroup
|
|
1537
|
+
? [h('span', '-')]
|
|
1538
|
+
: VxeUIRadioGroupComponent
|
|
1539
|
+
? [
|
|
1540
|
+
h(VxeUIRadioGroupComponent, {
|
|
1541
|
+
modelValue: column.renderFooterAlign || 'left',
|
|
1542
|
+
type: 'button',
|
|
1543
|
+
strict: false,
|
|
1544
|
+
disabled: isHidden,
|
|
1545
|
+
options: alignList,
|
|
1546
|
+
onChange({ value, $event }) {
|
|
1547
|
+
changeAlignOption(column, value, 'footerAlign', 'renderFooterAlign', 'custom-footer-align-change', $event)
|
|
1548
|
+
}
|
|
1549
|
+
})
|
|
1550
|
+
]
|
|
1551
|
+
: []
|
|
1552
|
+
)
|
|
1553
|
+
)
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
trVNs.push(
|
|
1557
|
+
h(
|
|
1558
|
+
'tr',
|
|
1559
|
+
{
|
|
1560
|
+
key: column.id,
|
|
1561
|
+
colid: column.id,
|
|
1562
|
+
class: [
|
|
1563
|
+
`vxe-table-custom-popup--row level--${column.level}`,
|
|
1564
|
+
{
|
|
1565
|
+
'is--group': isColGroup
|
|
1566
|
+
}
|
|
1567
|
+
],
|
|
1568
|
+
onDragstart: sortDragstartEvent,
|
|
1569
|
+
onDragend: sortDragendEvent,
|
|
1570
|
+
onDragover: sortDragoverEvent
|
|
1571
|
+
},
|
|
1572
|
+
tdVNs
|
|
1573
|
+
)
|
|
1574
|
+
)
|
|
1575
|
+
}
|
|
1576
|
+
})
|
|
1577
|
+
return trVNs
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
const renderPopupPanel = () => {
|
|
1581
|
+
const $xeGrid = $xeTable.xeGrid
|
|
1582
|
+
const $xeGantt = $xeTable.xeGantt
|
|
1583
|
+
|
|
1584
|
+
const { customStore } = props
|
|
1585
|
+
const { treeConfig, rowGroupConfig, aggregateConfig } = tableProps
|
|
1586
|
+
const { isCustomStatus, customColumnList } = tableReactData
|
|
1587
|
+
const vSize = computeSize.value
|
|
1588
|
+
const customOpts = computeCustomOpts.value
|
|
1589
|
+
const aggregateOpts = computeAggregateOpts.value
|
|
1590
|
+
const { panePopupStyle } = customStore
|
|
1591
|
+
const { placement: aggPlacement } = aggregateOpts
|
|
1592
|
+
const { mode, immediate, modalOptions, drawerOptions, allowVisible, allowFixed, allowAlign, allowHeaderAlign, allowFooterAlign, allowResizable } = customOpts
|
|
1593
|
+
const columnOpts = computeColumnOpts.value
|
|
1594
|
+
const { maxFixedSize } = columnOpts
|
|
1595
|
+
const modalOpts = Object.assign({}, modalOptions)
|
|
1596
|
+
const drawerOpts = Object.assign({}, drawerOptions)
|
|
1597
|
+
const slots = customOpts.slots || {}
|
|
1598
|
+
const headerSlot = slots.header
|
|
1599
|
+
const topSlot = slots.top
|
|
1600
|
+
const bottomSlot = slots.bottom
|
|
1601
|
+
const defaultSlot = slots.default
|
|
1602
|
+
const footerSlot = slots.footer
|
|
1603
|
+
const isAllChecked = customStore.isAll
|
|
1604
|
+
const isAllIndeterminate = customStore.isIndeterminate
|
|
1605
|
+
const isAggRtBmLayout = aggPlacement === 'right' || aggPlacement === 'bottom'
|
|
1606
|
+
const params = {
|
|
1607
|
+
$table: $xeTable,
|
|
1608
|
+
$grid: $xeGrid,
|
|
1609
|
+
$gantt: $xeGantt,
|
|
1610
|
+
columns: customColumnList,
|
|
1611
|
+
isAllChecked,
|
|
1612
|
+
isAllIndeterminate,
|
|
1613
|
+
isCustomStatus
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
const colVNs: VNode[] = []
|
|
1617
|
+
const headVNs: VNode[] = []
|
|
1618
|
+
if (allowVisible) {
|
|
1619
|
+
colVNs.push(
|
|
1620
|
+
h('col', {
|
|
1621
|
+
key: 'av',
|
|
1622
|
+
class: 'vxe-table-custom-popup--column-col col--checkbox'
|
|
1623
|
+
})
|
|
1624
|
+
)
|
|
1625
|
+
headVNs.push(
|
|
1626
|
+
h(
|
|
1627
|
+
'th',
|
|
1628
|
+
{
|
|
1629
|
+
key: 'av',
|
|
1630
|
+
class: 'vxe-table-custom-popup--column-th col--checkbox'
|
|
1631
|
+
},
|
|
1632
|
+
[
|
|
1633
|
+
h(
|
|
1634
|
+
'div',
|
|
1635
|
+
{
|
|
1636
|
+
class: [
|
|
1637
|
+
'vxe-table-custom--checkbox-option',
|
|
1638
|
+
{
|
|
1639
|
+
'is--checked': isAllChecked,
|
|
1640
|
+
'is--indeterminate': isAllIndeterminate
|
|
1641
|
+
}
|
|
1642
|
+
],
|
|
1643
|
+
title: getI18n('vxe.table.allTitle'),
|
|
1644
|
+
onClick: allOptionEvent
|
|
1645
|
+
},
|
|
1646
|
+
[
|
|
1647
|
+
h('span', {
|
|
1648
|
+
class: ['vxe-checkbox--icon', isAllIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllChecked ? getIcon().TABLE_CHECKBOX_CHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
|
|
1649
|
+
})
|
|
1650
|
+
// h('span', {
|
|
1651
|
+
// class: 'vxe-checkbox--label'
|
|
1652
|
+
// }, getI18n('vxe.toolbar.customAll'))
|
|
1653
|
+
]
|
|
1654
|
+
)
|
|
1655
|
+
]
|
|
1656
|
+
)
|
|
1657
|
+
)
|
|
1658
|
+
}
|
|
1659
|
+
colVNs.push(
|
|
1660
|
+
h('col', {
|
|
1661
|
+
key: 'at',
|
|
1662
|
+
class: 'vxe-table-custom-popup--column-col col--title'
|
|
1663
|
+
})
|
|
1664
|
+
)
|
|
1665
|
+
headVNs.push(
|
|
1666
|
+
h(
|
|
1667
|
+
'th',
|
|
1668
|
+
{
|
|
1669
|
+
key: 'at',
|
|
1670
|
+
class: 'vxe-table-custom-popup--column-th col--title'
|
|
1671
|
+
},
|
|
1672
|
+
getI18n('vxe.custom.setting.colTitle')
|
|
1673
|
+
)
|
|
1674
|
+
)
|
|
1675
|
+
if (allowResizable) {
|
|
1676
|
+
colVNs.push(
|
|
1677
|
+
h('col', {
|
|
1678
|
+
key: 'aw',
|
|
1679
|
+
class: 'vxe-table-custom-popup--column-col col--width'
|
|
1680
|
+
})
|
|
1681
|
+
)
|
|
1682
|
+
headVNs.push(
|
|
1683
|
+
h(
|
|
1684
|
+
'th',
|
|
1685
|
+
{
|
|
1686
|
+
key: 'aw',
|
|
1687
|
+
class: 'vxe-table-custom-popup--column-th col--width'
|
|
1688
|
+
},
|
|
1689
|
+
getI18n('vxe.custom.setting.colResizable')
|
|
1690
|
+
)
|
|
1691
|
+
)
|
|
1692
|
+
}
|
|
1693
|
+
if (allowFixed) {
|
|
1694
|
+
colVNs.push(
|
|
1695
|
+
h('col', {
|
|
1696
|
+
key: 'af',
|
|
1697
|
+
class: 'vxe-table-custom-popup--column-col col--fixed'
|
|
1698
|
+
})
|
|
1699
|
+
)
|
|
1700
|
+
headVNs.push(
|
|
1701
|
+
h(
|
|
1702
|
+
'th',
|
|
1703
|
+
{
|
|
1704
|
+
key: 'af',
|
|
1705
|
+
class: 'vxe-table-custom-popup--column-th col--fixed'
|
|
1706
|
+
},
|
|
1707
|
+
getI18n(`vxe.custom.setting.${maxFixedSize ? 'colFixedMax' : 'colFixed'}`, [maxFixedSize])
|
|
1708
|
+
)
|
|
1709
|
+
)
|
|
1710
|
+
}
|
|
1711
|
+
if (allowAlign) {
|
|
1712
|
+
colVNs.push(
|
|
1713
|
+
h('col', {
|
|
1714
|
+
key: 'aa',
|
|
1715
|
+
class: 'vxe-table-custom-popup--column-col col--align'
|
|
1716
|
+
})
|
|
1717
|
+
)
|
|
1718
|
+
headVNs.push(
|
|
1719
|
+
h(
|
|
1720
|
+
'th',
|
|
1721
|
+
{
|
|
1722
|
+
key: 'aa',
|
|
1723
|
+
class: 'vxe-table-custom-popup--column-th col--align'
|
|
1724
|
+
},
|
|
1725
|
+
getI18n('vxe.custom.setting.colAlign')
|
|
1726
|
+
)
|
|
1727
|
+
)
|
|
1728
|
+
}
|
|
1729
|
+
if (allowHeaderAlign) {
|
|
1730
|
+
colVNs.push(
|
|
1731
|
+
h('col', {
|
|
1732
|
+
key: 'aha',
|
|
1733
|
+
class: 'vxe-table-custom-popup--column-col col--header-align'
|
|
1734
|
+
})
|
|
1735
|
+
)
|
|
1736
|
+
headVNs.push(
|
|
1737
|
+
h(
|
|
1738
|
+
'th',
|
|
1739
|
+
{
|
|
1740
|
+
key: 'aha',
|
|
1741
|
+
class: 'vxe-table-custom-popup--column-th col--header-align'
|
|
1742
|
+
},
|
|
1743
|
+
getI18n('vxe.custom.setting.colHeadAlign')
|
|
1744
|
+
)
|
|
1745
|
+
)
|
|
1746
|
+
}
|
|
1747
|
+
if (allowFooterAlign) {
|
|
1748
|
+
colVNs.push(
|
|
1749
|
+
h('col', {
|
|
1750
|
+
key: 'afa',
|
|
1751
|
+
class: 'vxe-table-custom-popup--column-col col--footer-align'
|
|
1752
|
+
})
|
|
1753
|
+
)
|
|
1754
|
+
headVNs.push(
|
|
1755
|
+
h(
|
|
1756
|
+
'th',
|
|
1757
|
+
{
|
|
1758
|
+
key: 'afa',
|
|
1759
|
+
class: 'vxe-table-custom-popup--column-th col--footer-align'
|
|
1760
|
+
},
|
|
1761
|
+
getI18n('vxe.custom.setting.colFootAlign')
|
|
1762
|
+
)
|
|
1763
|
+
)
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
const scopedSlots: Record<string, any> = {
|
|
1767
|
+
default: () => {
|
|
1768
|
+
return h(
|
|
1769
|
+
'div',
|
|
1770
|
+
{
|
|
1771
|
+
ref: refBodyWrapperElem,
|
|
1772
|
+
class: [
|
|
1773
|
+
'vxe-table-custom-popup--body-wrapper',
|
|
1774
|
+
`agg-layout--${aggPlacement}`,
|
|
1775
|
+
{
|
|
1776
|
+
[`size--${vSize}`]: vSize
|
|
1777
|
+
}
|
|
1778
|
+
],
|
|
1779
|
+
style: panePopupStyle
|
|
1780
|
+
},
|
|
1781
|
+
defaultSlot
|
|
1782
|
+
? $xeTable.callSlot(defaultSlot, params)
|
|
1783
|
+
: [
|
|
1784
|
+
!isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
|
|
1785
|
+
? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
1786
|
+
customStore
|
|
1787
|
+
})
|
|
1788
|
+
: renderEmptyElement($xeTable),
|
|
1789
|
+
h(
|
|
1790
|
+
'div',
|
|
1791
|
+
{
|
|
1792
|
+
ref: refCustomBodyElem,
|
|
1793
|
+
class: 'vxe-table-custom-popup--handle-wrapper'
|
|
1794
|
+
},
|
|
1795
|
+
[
|
|
1796
|
+
topSlot
|
|
1797
|
+
? h(
|
|
1798
|
+
'div',
|
|
1799
|
+
{
|
|
1800
|
+
class: 'vxe-table-custom-popup--table-top'
|
|
1801
|
+
},
|
|
1802
|
+
$xeTable.callSlot(topSlot, params)
|
|
1803
|
+
)
|
|
1804
|
+
: renderEmptyElement($xeTable),
|
|
1805
|
+
h(
|
|
1806
|
+
'div',
|
|
1807
|
+
{
|
|
1808
|
+
class: 'vxe-table-custom-popup--table-wrapper'
|
|
1809
|
+
},
|
|
1810
|
+
[
|
|
1811
|
+
h('table', {}, [
|
|
1812
|
+
h('colgroup', {}, colVNs),
|
|
1813
|
+
h('thead', {}, [h('tr', {}, headVNs)]),
|
|
1814
|
+
h(
|
|
1815
|
+
TransitionGroup,
|
|
1816
|
+
{
|
|
1817
|
+
class: 'vxe-table-custom--panel-list',
|
|
1818
|
+
tag: 'tbody',
|
|
1819
|
+
name: 'vxe-table-custom--list'
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
default: () => renderPopupBodys()
|
|
1823
|
+
}
|
|
1824
|
+
)
|
|
1825
|
+
])
|
|
1826
|
+
]
|
|
1827
|
+
),
|
|
1828
|
+
bottomSlot
|
|
1829
|
+
? h(
|
|
1830
|
+
'div',
|
|
1831
|
+
{
|
|
1832
|
+
class: 'vxe-table-custom-popup--table-bottom'
|
|
1833
|
+
},
|
|
1834
|
+
$xeTable.callSlot(bottomSlot, params)
|
|
1835
|
+
)
|
|
1836
|
+
: renderEmptyElement($xeTable),
|
|
1837
|
+
renderDragTip()
|
|
1838
|
+
]
|
|
1839
|
+
),
|
|
1840
|
+
isAggRtBmLayout && !treeConfig && (aggregateConfig || rowGroupConfig) && $xeTable.getPivotTableAggregatePopupPanel
|
|
1841
|
+
? h($xeTable.getPivotTableAggregatePopupPanel(), {
|
|
1842
|
+
customStore
|
|
1843
|
+
})
|
|
1844
|
+
: renderEmptyElement($xeTable)
|
|
1845
|
+
]
|
|
1846
|
+
)
|
|
1847
|
+
},
|
|
1848
|
+
footer: () => {
|
|
1849
|
+
if (footerSlot) {
|
|
1850
|
+
return $xeTable.callSlot(footerSlot, params)
|
|
1851
|
+
}
|
|
1852
|
+
return h(
|
|
1853
|
+
'div',
|
|
1854
|
+
{
|
|
1855
|
+
class: 'vxe-table-custom-popup--footer'
|
|
1856
|
+
},
|
|
1857
|
+
[
|
|
1858
|
+
VxeUIButtonComponent
|
|
1859
|
+
? h(VxeUIButtonComponent, {
|
|
1860
|
+
content: customOpts.resetButtonText || getI18n('vxe.custom.cstmRestore'),
|
|
1861
|
+
disabled: !isCustomStatus,
|
|
1862
|
+
onClick: resetCustomEvent
|
|
1863
|
+
})
|
|
1864
|
+
: renderEmptyElement($xeTable),
|
|
1865
|
+
immediate
|
|
1866
|
+
? VxeUIButtonComponent
|
|
1867
|
+
? h(VxeUIButtonComponent, {
|
|
1868
|
+
status: 'primary',
|
|
1869
|
+
content: customOpts.closeButtonText || getI18n('vxe.table.customClose'),
|
|
1870
|
+
onClick: cancelCloseEvent
|
|
1871
|
+
})
|
|
1872
|
+
: renderEmptyElement($xeTable)
|
|
1873
|
+
: VxeUIButtonComponent
|
|
1874
|
+
? h(VxeUIButtonComponent, {
|
|
1875
|
+
content: customOpts.cancelButtonText || getI18n('vxe.table.customCancel'),
|
|
1876
|
+
onClick: cancelCustomEvent
|
|
1877
|
+
})
|
|
1878
|
+
: renderEmptyElement($xeTable),
|
|
1879
|
+
immediate
|
|
1880
|
+
? renderEmptyElement($xeTable)
|
|
1881
|
+
: VxeUIButtonComponent
|
|
1882
|
+
? h(VxeUIButtonComponent, {
|
|
1883
|
+
status: 'primary',
|
|
1884
|
+
content: customOpts.confirmButtonText || getI18n('vxe.custom.cstmConfirm'),
|
|
1885
|
+
onClick: confirmCustomEvent
|
|
1886
|
+
})
|
|
1887
|
+
: renderEmptyElement($xeTable)
|
|
1888
|
+
]
|
|
1889
|
+
)
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
if (headerSlot) {
|
|
1893
|
+
scopedSlots.header = () => $xeTable.callSlot(headerSlot, params)
|
|
1894
|
+
}
|
|
1895
|
+
if (mode === 'drawer') {
|
|
1896
|
+
return VxeUIDrawerComponent
|
|
1897
|
+
? h(
|
|
1898
|
+
VxeUIDrawerComponent,
|
|
1899
|
+
{
|
|
1900
|
+
key: 'drawer',
|
|
1901
|
+
className: ['vxe-table-custom-drawer-wrapper', 'vxe-table--ignore-clear', drawerOpts.className || ''].join(' '),
|
|
1902
|
+
modelValue: customStore.visible,
|
|
1903
|
+
title: drawerOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
1904
|
+
width: drawerOpts.width || Math.min(880, Math.floor(document.documentElement.clientWidth * 0.6)),
|
|
1905
|
+
position: drawerOpts.position,
|
|
1906
|
+
resize: !!drawerOpts.resize,
|
|
1907
|
+
escClosable: !!drawerOpts.escClosable,
|
|
1908
|
+
maskClosable: !!drawerOpts.maskClosable,
|
|
1909
|
+
destroyOnClose: true,
|
|
1910
|
+
showFooter: true,
|
|
1911
|
+
'onUpdate:modelValue'(value: any) {
|
|
1912
|
+
customStore.visible = value
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
scopedSlots
|
|
1916
|
+
)
|
|
1917
|
+
: renderEmptyElement($xeTable)
|
|
1918
|
+
}
|
|
1919
|
+
return VxeUIModalComponent
|
|
1920
|
+
? h(
|
|
1921
|
+
VxeUIModalComponent,
|
|
1922
|
+
{
|
|
1923
|
+
key: 'modal',
|
|
1924
|
+
className: ['vxe-table-custom-modal-wrapper', 'vxe-table--ignore-clear', modalOpts.className || ''].join(' '),
|
|
1925
|
+
modelValue: customStore.visible,
|
|
1926
|
+
title: modalOpts.title || getI18n('vxe.custom.cstmTitle'),
|
|
1927
|
+
width: modalOpts.width || Math.min(1000, document.documentElement.clientWidth),
|
|
1928
|
+
minWidth: modalOpts.minWidth || 800,
|
|
1929
|
+
height: modalOpts.height || Math.min(680, document.documentElement.clientHeight),
|
|
1930
|
+
minHeight: modalOpts.minHeight || 400,
|
|
1931
|
+
showZoom: modalOpts.showZoom,
|
|
1932
|
+
showMaximize: modalOpts.showMaximize,
|
|
1933
|
+
showMinimize: modalOpts.showMinimize,
|
|
1934
|
+
mask: modalOpts.mask,
|
|
1935
|
+
lockView: modalOpts.lockView,
|
|
1936
|
+
resize: modalOpts.resize,
|
|
1937
|
+
transfer: modalOpts.transfer,
|
|
1938
|
+
escClosable: !!modalOpts.escClosable,
|
|
1939
|
+
maskClosable: !!modalOpts.maskClosable,
|
|
1940
|
+
destroyOnClose: true,
|
|
1941
|
+
showFooter: true,
|
|
1942
|
+
'onUpdate:modelValue'(value: any) {
|
|
1943
|
+
customStore.visible = value
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
scopedSlots
|
|
1947
|
+
)
|
|
1948
|
+
: renderEmptyElement($xeTable)
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
const renderVN = () => {
|
|
1952
|
+
const customOpts = computeCustomOpts.value
|
|
1953
|
+
if (['modal', 'drawer', 'popup'].includes(`${customOpts.mode}`)) {
|
|
1954
|
+
return renderPopupPanel()
|
|
1955
|
+
}
|
|
1956
|
+
return renderSimplePanel()
|
|
1957
|
+
}
|
|
1958
|
+
|
|
1959
|
+
nextTick(() => {
|
|
1960
|
+
const customOpts = computeCustomOpts.value
|
|
1961
|
+
const { mode } = customOpts
|
|
1962
|
+
if (!VxeUIModalComponent && mode === 'modal') {
|
|
1963
|
+
errLog('vxe.error.reqComp', ['vxe-modal'])
|
|
1964
|
+
}
|
|
1965
|
+
if (!VxeUIDrawerComponent && mode === 'drawer') {
|
|
1966
|
+
errLog('vxe.error.reqComp', ['vxe-drawer'])
|
|
1967
|
+
}
|
|
1968
|
+
if (!VxeUIButtonComponent) {
|
|
1969
|
+
errLog('vxe.error.reqComp', ['vxe-button'])
|
|
1970
|
+
}
|
|
1971
|
+
if (!VxeUINumberInputComponent) {
|
|
1972
|
+
errLog('vxe.error.reqComp', ['vxe-number-input'])
|
|
1973
|
+
}
|
|
1974
|
+
if (!VxeUIRadioGroupComponent) {
|
|
1975
|
+
errLog('vxe.error.reqComp', ['vxe-radio-group'])
|
|
1976
|
+
}
|
|
1977
|
+
})
|
|
1978
|
+
|
|
1979
|
+
const $xeTableCustomPanel: VxeTableCustomPanelConstructor = {
|
|
1980
|
+
xID,
|
|
1981
|
+
props,
|
|
1982
|
+
context,
|
|
1983
|
+
reactData: customPanelReactData,
|
|
1984
|
+
internalData: customPanelInternalData,
|
|
1985
|
+
xeTable: $xeTable,
|
|
1986
|
+
getRefMaps: () => refMaps,
|
|
1987
|
+
getComputeMaps: () => computeMaps,
|
|
1988
|
+
renderVN
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
onUnmounted(() => {
|
|
1992
|
+
customPanelInternalData = createInternalData()
|
|
1993
|
+
})
|
|
1994
|
+
|
|
1995
|
+
provide('$xeTableCustomPanel', $xeTableCustomPanel)
|
|
1996
|
+
|
|
1997
|
+
return $xeTableCustomPanel
|
|
1998
|
+
},
|
|
1999
|
+
render() {
|
|
2000
|
+
return this.renderVN()
|
|
2001
|
+
}
|
|
2002
|
+
})
|