x-next 1.11.1 → 1.13.0
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/AI_USAGE/catalog.md +1 -1
- package/AI_USAGE/components/alert.md +1 -1
- package/AI_USAGE/components/bar-chart.md +1 -1
- package/AI_USAGE/components/button.md +1 -1
- package/AI_USAGE/components/checkbox.md +1 -1
- package/AI_USAGE/components/color-picker.md +1 -1
- package/AI_USAGE/components/config-provider.md +1 -1
- package/AI_USAGE/components/date-picker.md +1 -1
- package/AI_USAGE/components/dialog.md +1 -1
- package/AI_USAGE/components/dropdown.md +1 -1
- package/AI_USAGE/components/empty.md +1 -1
- package/AI_USAGE/components/input.md +1 -1
- package/AI_USAGE/components/line-chart.md +1 -1
- package/AI_USAGE/components/message-box.md +1 -1
- package/AI_USAGE/components/message.md +1 -1
- package/AI_USAGE/components/notification.md +1 -1
- package/AI_USAGE/components/pagination.md +7 -3
- package/AI_USAGE/components/pie-chart.md +1 -1
- package/AI_USAGE/components/popconfirm.md +1 -1
- package/AI_USAGE/components/popover.md +1 -1
- package/AI_USAGE/components/progress.md +1 -1
- package/AI_USAGE/components/radio.md +1 -1
- package/AI_USAGE/components/rate.md +1 -1
- package/AI_USAGE/components/select.md +1 -1
- package/AI_USAGE/components/slider.md +1 -1
- package/AI_USAGE/components/steps.md +1 -1
- package/AI_USAGE/components/switch.md +1 -1
- package/AI_USAGE/components/tabs.md +1 -1
- package/AI_USAGE/components/textarea.md +1 -1
- package/AI_USAGE/components/time-picker.md +1 -1
- package/AI_USAGE/components/upload.md +1 -1
- package/AI_USAGE/core.md +1 -1
- package/AI_USAGE/index.md +1 -1
- package/AI_USAGE/recipes/form-on-demand.md +1 -1
- package/AI_USAGE.md +8 -4
- package/CHANGELOG.md +40 -0
- package/dist/components/network/Network.vue.d.ts +8 -4
- package/dist/components/network/index.d.ts +13 -5
- package/dist/components/network/props.d.ts +5 -0
- package/dist/components/network/utils.d.ts +3 -3
- package/dist/components/pagination/page-item-ellipsis.vue.d.ts +4 -1
- package/dist/components/pagination/page-item-step.vue.d.ts +101 -130
- package/dist/components/pagination/page-item.vue.d.ts +1 -0
- package/dist/components/pagination/page-jumper.vue.d.ts +1 -1
- package/dist/components/pagination/page-options.vue.d.ts +6 -4
- package/dist/components/pagination/utils.d.ts +3 -0
- package/dist/components/table/Table.d.ts +11 -0
- package/dist/components/table/context.d.ts +5 -0
- package/dist/components/table/dom-listeners.d.ts +23 -0
- package/dist/components/table/hooks/use-column-resize.d.ts +2 -1
- package/dist/components/table/hooks/use-drag.d.ts +6 -3
- package/dist/components/table/hooks/use-keyboard-navigation.d.ts +27 -0
- package/dist/components/table/hooks/use-sorter.d.ts +3 -1
- package/dist/components/table/index.d.ts +15 -0
- package/dist/components/table/interface.d.ts +9 -2
- package/dist/components/table/locale.d.ts +8 -7
- package/dist/components/table/table-operation-td.d.ts +34 -0
- package/dist/components/table/table-td.d.ts +36 -2
- package/dist/components/table/table-th.d.ts +34 -0
- package/dist/components/table/table-tr.d.ts +34 -0
- package/dist/components/time-range-selector/index.d.ts +6 -6
- package/dist/components/trend-chart/components/TrendChart.d.ts +1 -1
- package/dist/components/trend-chart/index.d.ts +3 -3
- package/dist/components/upload/Upload.d.ts +1 -1
- package/dist/components/upload/index.d.ts +3 -3
- package/dist/es/_styles/palette-aliases.js +4 -4
- package/dist/es/components/button/Button.js +53 -42
- package/dist/es/components/network/Network.vue.js +17 -12
- package/dist/es/components/network/Network.vue2.js +78 -70
- package/dist/es/components/network/utils.js +112 -71
- package/dist/es/components/pagination/Pagination.js +132 -123
- package/dist/es/components/pagination/page-item-ellipsis.vue.js +10 -10
- package/dist/es/components/pagination/page-item-ellipsis.vue2.js +24 -19
- package/dist/es/components/pagination/page-item-step.vue.js +14 -11
- package/dist/es/components/pagination/page-item-step.vue2.js +20 -22
- package/dist/es/components/pagination/page-item.vue.js +10 -9
- package/dist/es/components/pagination/page-item.vue2.js +24 -19
- package/dist/es/components/pagination/page-jumper.vue2.js +23 -23
- package/dist/es/components/pagination/page-options.vue.js +15 -10
- package/dist/es/components/pagination/page-options.vue2.js +21 -17
- package/dist/es/components/pagination/utils.js +4 -2
- package/dist/es/components/table/Table.js +947 -713
- package/dist/es/components/table/dom-listeners.js +23 -0
- package/dist/es/components/table/hooks/use-column-resize.js +27 -18
- package/dist/es/components/table/hooks/use-column-sorter.js +22 -29
- package/dist/es/components/table/hooks/use-drag.js +23 -20
- package/dist/es/components/table/hooks/use-filter.js +43 -43
- package/dist/es/components/table/hooks/use-keyboard-navigation.js +69 -0
- package/dist/es/components/table/hooks/use-row-selection.js +33 -29
- package/dist/es/components/table/hooks/use-sorter.js +86 -38
- package/dist/es/components/table/hooks/use-span.js +28 -35
- package/dist/es/components/table/locale.js +27 -10
- package/dist/es/components/table/table-col-group.vue2.js +9 -9
- package/dist/es/components/table/table-operation-td.js +72 -51
- package/dist/es/components/table/table-operation-th.js +41 -34
- package/dist/es/components/table/table-td.js +100 -77
- package/dist/es/components/table/table-th.js +221 -188
- package/dist/es/components/table/table-tr.js +11 -8
- package/dist/es/components/table/utils.js +104 -94
- package/dist/es/components/virtual-list-v2/hooks/use-size.js +47 -41
- package/dist/es/components/virtual-list-v2/virtual-list-item.js +29 -16
- package/dist/es/locale/en-US.js +9 -1
- package/dist/es/locale/index.js +3 -3
- package/dist/es/locale/zh-CN.js +9 -1
- package/dist/es/style.css +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.umd.js +3 -3
- package/dist/locale/interface.d.ts +12 -0
- package/dist/style/base.css +1 -1
- package/dist/style/button.css +1 -1
- package/dist/style/form-select.css +1 -1
- package/dist/style/network.css +1 -1
- package/dist/style/pagination.css +1 -1
- package/dist/style/table.css +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,49 +1,52 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isObject as
|
|
3
|
-
import { debounce as
|
|
4
|
-
import { getGroupColumns as
|
|
5
|
-
import { useRowSelection as
|
|
6
|
-
import { useExpand as
|
|
7
|
-
import { usePagination as
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { Spin as
|
|
11
|
-
import { Pagination as
|
|
12
|
-
import { Empty as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import { omit as
|
|
24
|
-
import { useDrag as
|
|
25
|
-
import { useColumnResize as
|
|
26
|
-
import { tableInjectionKey as
|
|
27
|
-
import { useFilter as
|
|
28
|
-
import { useSorter as
|
|
29
|
-
import { useSpan as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import { defineComponent as ha, toRefs as va, computed as g, ref as A, useId as ga, reactive as _e, watch as J, watchEffect as ma, onBeforeUnmount as It, toRef as Ht, provide as ya, nextTick as jt, onMounted as ba, createVNode as s, Fragment as Ve, mergeProps as F, isVNode as pa } from "vue";
|
|
2
|
+
import { isObject as qe, isFunction as Q, isNumber as W, isString as xa, isArray as Sa, isUndefined as wa, isNull as Ca } from "../../_utils/is.js";
|
|
3
|
+
import { debounce as Nt } from "../../_utils/debounce.js";
|
|
4
|
+
import { getGroupColumns as ka, mapArrayWithChildren as Ra, mapRawTableData as _t, getColumnsFromSlot as Pa, getSelectionStatus as La, getLeafKeys as Aa } from "./utils.js";
|
|
5
|
+
import { useRowSelection as Ea } from "./hooks/use-row-selection.js";
|
|
6
|
+
import { useExpand as Ta } from "./hooks/use-expand.js";
|
|
7
|
+
import { usePagination as Ka } from "./hooks/use-pagination.js";
|
|
8
|
+
import Da from "../../icons/default/plus.js";
|
|
9
|
+
import Ba from "../../icons/default/minus.js";
|
|
10
|
+
import { Spin as $a } from "../spin/index.js";
|
|
11
|
+
import { Pagination as Ma } from "../pagination/index.js";
|
|
12
|
+
import { Empty as za } from "../empty/index.js";
|
|
13
|
+
import Se from "./table-col-group.vue.js";
|
|
14
|
+
import Fa from "./table-thead.js";
|
|
15
|
+
import Wa from "./table-tbody.js";
|
|
16
|
+
import ne from "./table-tr.js";
|
|
17
|
+
import Oa from "./table-th.js";
|
|
18
|
+
import we from "./table-td.js";
|
|
19
|
+
import Ia from "./table-operation-th.js";
|
|
20
|
+
import Vt from "./table-operation-td.js";
|
|
21
|
+
import Ha from "../virtual-list-v2/virtual-list.vue.js";
|
|
22
|
+
import qt from "../../_container/resize-observer.js";
|
|
23
|
+
import { omit as Yt } from "../../_utils/omit.js";
|
|
24
|
+
import { useDrag as ja } from "./hooks/use-drag.js";
|
|
25
|
+
import { useColumnResize as Na } from "./hooks/use-column-resize.js";
|
|
26
|
+
import { tableInjectionKey as _a } from "./context.js";
|
|
27
|
+
import { useFilter as Va } from "./hooks/use-filter.js";
|
|
28
|
+
import { useSorter as qa } from "./hooks/use-sorter.js";
|
|
29
|
+
import { useSpan as Ut } from "./hooks/use-span.js";
|
|
30
|
+
import { useKeyboardNavigation as Ya } from "./hooks/use-keyboard-navigation.js";
|
|
31
|
+
import { useChildrenComponents as Ua } from "../../_hooks/use-children-components.js";
|
|
32
|
+
import { Scrollbar as Gt } from "../scrollbar-v2/index.js";
|
|
33
|
+
import { useComponentRef as Ye } from "../../_hooks/use-component-ref.js";
|
|
34
|
+
import { useSize as Ga } from "../../_hooks/use-size.js";
|
|
35
|
+
import { useLocale as Ja } from "../../locale/index.js";
|
|
36
|
+
import { useScrollbar as Qa } from "../../_hooks/use-scrollbar.js";
|
|
37
|
+
import { setValueByPath as Jt, getValueByPath as Ue } from "../../_utils/get-value-by-path.js";
|
|
38
|
+
import { getClassNameMixin as Xa } from "../../_utils/config.js";
|
|
39
|
+
import { useTableLocale as Za } from "./locale.js";
|
|
40
|
+
import en from "../../icons/animation/animation-loading.js";
|
|
41
|
+
function tn(l) {
|
|
42
|
+
return typeof l == "function" || Object.prototype.toString.call(l) === "[object Object]" && !pa(l);
|
|
40
43
|
}
|
|
41
|
-
const
|
|
44
|
+
const Qt = {
|
|
42
45
|
wrapper: !0,
|
|
43
46
|
cell: !1,
|
|
44
47
|
headerCell: !1,
|
|
45
48
|
bodyCell: !1
|
|
46
|
-
},
|
|
49
|
+
}, qn = /* @__PURE__ */ ha({
|
|
47
50
|
name: "Table",
|
|
48
51
|
props: {
|
|
49
52
|
/**
|
|
@@ -54,6 +57,11 @@ const bt = {
|
|
|
54
57
|
type: Array,
|
|
55
58
|
default: () => []
|
|
56
59
|
},
|
|
60
|
+
/** @zh 启用表体单元格方向键、Home / End 导航,保留原生 table 语义。 */
|
|
61
|
+
keyboardNavigation: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: !1
|
|
64
|
+
},
|
|
57
65
|
/**
|
|
58
66
|
* @zh 表格的数据
|
|
59
67
|
* @en Table data
|
|
@@ -347,21 +355,21 @@ const bt = {
|
|
|
347
355
|
}
|
|
348
356
|
},
|
|
349
357
|
emits: {
|
|
350
|
-
"update:selectedKeys": (
|
|
351
|
-
"update:expandedKeys": (
|
|
358
|
+
"update:selectedKeys": (l) => !0,
|
|
359
|
+
"update:expandedKeys": (l) => !0,
|
|
352
360
|
/**
|
|
353
361
|
* @zh 点击展开行时触发
|
|
354
362
|
* @en Triggered when a row is clicked to expand
|
|
355
363
|
* @param {string | number} rowKey
|
|
356
364
|
* @param {TableData} record
|
|
357
365
|
*/
|
|
358
|
-
expand: (
|
|
366
|
+
expand: (l, v) => !0,
|
|
359
367
|
/**
|
|
360
368
|
* @zh 已展开的数据行发生改变时触发
|
|
361
369
|
* @en Triggered when the expanded data row changes
|
|
362
370
|
* @param {(string | number)[]} rowKeys
|
|
363
371
|
*/
|
|
364
|
-
expandedChange: (
|
|
372
|
+
expandedChange: (l) => !0,
|
|
365
373
|
/**
|
|
366
374
|
* @zh 点击行选择器时触发
|
|
367
375
|
* @en Triggered when the row selector is clicked
|
|
@@ -369,45 +377,45 @@ const bt = {
|
|
|
369
377
|
* @param {string | number} rowKey
|
|
370
378
|
* @param {TableData} record
|
|
371
379
|
*/
|
|
372
|
-
select: (
|
|
380
|
+
select: (l, v, h) => !0,
|
|
373
381
|
/**
|
|
374
382
|
* @zh 点击全选选择器时触发
|
|
375
383
|
* @en Triggered when the select all selector is clicked
|
|
376
384
|
* @param {boolean} checked
|
|
377
385
|
*/
|
|
378
|
-
selectAll: (
|
|
386
|
+
selectAll: (l) => !0,
|
|
379
387
|
/**
|
|
380
388
|
* @zh 已选择的数据行发生改变时触发
|
|
381
389
|
* @en Triggered when the selected data row changes
|
|
382
390
|
* @param {(string | number)[]} rowKeys
|
|
383
391
|
*/
|
|
384
|
-
selectionChange: (
|
|
392
|
+
selectionChange: (l) => !0,
|
|
385
393
|
/**
|
|
386
394
|
* @zh 排序规则发生改变时触发
|
|
387
395
|
* @en Triggered when the collation changes
|
|
388
396
|
* @param {string} dataIndex
|
|
389
397
|
* @param {string} direction
|
|
390
398
|
*/
|
|
391
|
-
sorterChange: (
|
|
399
|
+
sorterChange: (l, v) => !0,
|
|
392
400
|
/**
|
|
393
401
|
* @zh 过滤选项发生改变时触发
|
|
394
402
|
* @en Triggered when the filter options are changed
|
|
395
403
|
* @param {string} dataIndex
|
|
396
404
|
* @param {string[]} filteredValues
|
|
397
405
|
*/
|
|
398
|
-
filterChange: (
|
|
406
|
+
filterChange: (l, v) => !0,
|
|
399
407
|
/**
|
|
400
408
|
* @zh 表格分页发生改变时触发
|
|
401
409
|
* @en Triggered when the table pagination changes
|
|
402
410
|
* @param {number} page
|
|
403
411
|
*/
|
|
404
|
-
pageChange: (
|
|
412
|
+
pageChange: (l) => !0,
|
|
405
413
|
/**
|
|
406
414
|
* @zh 表格每页数据数量发生改变时触发
|
|
407
415
|
* @en Triggered when the number of data per page of the table changes
|
|
408
416
|
* @param {number} pageSize
|
|
409
417
|
*/
|
|
410
|
-
pageSizeChange: (
|
|
418
|
+
pageSizeChange: (l) => !0,
|
|
411
419
|
/**
|
|
412
420
|
* @zh 表格数据发生变化时触发
|
|
413
421
|
* @en Triggered when table data changes
|
|
@@ -416,7 +424,7 @@ const bt = {
|
|
|
416
424
|
* @param {TableData[]} currentData
|
|
417
425
|
* @version 2.40.0 增加 currentData
|
|
418
426
|
*/
|
|
419
|
-
change: (
|
|
427
|
+
change: (l, v, h) => !0,
|
|
420
428
|
/**
|
|
421
429
|
* @zh 单元格 hover 进入时触发
|
|
422
430
|
* @en Triggered when hovering into a cell
|
|
@@ -424,7 +432,7 @@ const bt = {
|
|
|
424
432
|
* @param {TableColumnData} column
|
|
425
433
|
* @param {Event} ev
|
|
426
434
|
*/
|
|
427
|
-
cellMouseEnter: (
|
|
435
|
+
cellMouseEnter: (l, v, h) => !0,
|
|
428
436
|
/**
|
|
429
437
|
* @zh 单元格 hover 退出时触发
|
|
430
438
|
* @en Triggered when hovering out of a cell
|
|
@@ -432,7 +440,7 @@ const bt = {
|
|
|
432
440
|
* @param {TableColumnData} column
|
|
433
441
|
* @param {Event} ev
|
|
434
442
|
*/
|
|
435
|
-
cellMouseLeave: (
|
|
443
|
+
cellMouseLeave: (l, v, h) => !0,
|
|
436
444
|
/**
|
|
437
445
|
* @zh 点击单元格时触发
|
|
438
446
|
* @en Triggered when a cell is clicked
|
|
@@ -440,21 +448,21 @@ const bt = {
|
|
|
440
448
|
* @param {TableColumnData} column
|
|
441
449
|
* @param {Event} ev
|
|
442
450
|
*/
|
|
443
|
-
cellClick: (
|
|
451
|
+
cellClick: (l, v, h) => !0,
|
|
444
452
|
/**
|
|
445
453
|
* @zh 点击行数据时触发
|
|
446
454
|
* @en Triggered when row data is clicked
|
|
447
455
|
* @param {TableData} record
|
|
448
456
|
* @param {Event} ev
|
|
449
457
|
*/
|
|
450
|
-
rowClick: (
|
|
458
|
+
rowClick: (l, v) => !0,
|
|
451
459
|
/**
|
|
452
460
|
* @zh 点击表头数据时触发
|
|
453
461
|
* @en Triggered when the header data is clicked
|
|
454
462
|
* @param {TableColumnData} column
|
|
455
463
|
* @param {Event} ev
|
|
456
464
|
*/
|
|
457
|
-
headerClick: (
|
|
465
|
+
headerClick: (l, v) => !0,
|
|
458
466
|
/**
|
|
459
467
|
* @zh 调整列宽时触发
|
|
460
468
|
* @en Triggered when column width is adjusted
|
|
@@ -462,14 +470,14 @@ const bt = {
|
|
|
462
470
|
* @param {number} width
|
|
463
471
|
* @version 2.28.0
|
|
464
472
|
*/
|
|
465
|
-
columnResize: (
|
|
473
|
+
columnResize: (l, v) => !0,
|
|
466
474
|
/**
|
|
467
475
|
* @zh 双击行数据时触发
|
|
468
476
|
* @en Triggered when row data is double clicked
|
|
469
477
|
* @param {TableData} record
|
|
470
478
|
* @param {Event} ev
|
|
471
479
|
*/
|
|
472
|
-
rowDblclick: (
|
|
480
|
+
rowDblclick: (l, v) => !0,
|
|
473
481
|
/**
|
|
474
482
|
* @zh 双击单元格时触发
|
|
475
483
|
* @en Triggered when a cell is double clicked
|
|
@@ -477,14 +485,14 @@ const bt = {
|
|
|
477
485
|
* @param {TableColumnData} column
|
|
478
486
|
* @param {Event} ev
|
|
479
487
|
*/
|
|
480
|
-
cellDblclick: (
|
|
488
|
+
cellDblclick: (l, v, h) => !0,
|
|
481
489
|
/**
|
|
482
490
|
* @zh 右击行数据时触发
|
|
483
491
|
* @en Triggered when row data is right clicked
|
|
484
492
|
* @param {TableData} record
|
|
485
493
|
* @param {Event} ev
|
|
486
494
|
*/
|
|
487
|
-
rowContextmenu: (
|
|
495
|
+
rowContextmenu: (l, v) => !0,
|
|
488
496
|
/**
|
|
489
497
|
* @zh 右击单元格时触发
|
|
490
498
|
* @en Triggered when a cell is right clicked
|
|
@@ -492,7 +500,7 @@ const bt = {
|
|
|
492
500
|
* @param {TableColumnData} column
|
|
493
501
|
* @param {Event} ev
|
|
494
502
|
*/
|
|
495
|
-
cellContextmenu: (
|
|
503
|
+
cellContextmenu: (l, v, h) => !0
|
|
496
504
|
},
|
|
497
505
|
/**
|
|
498
506
|
* @zh 表格列定义。启用时会屏蔽 columns 属性
|
|
@@ -585,904 +593,1130 @@ const bt = {
|
|
|
585
593
|
* @binding {TableColumnData} column
|
|
586
594
|
* @version 2.26.0
|
|
587
595
|
*/
|
|
588
|
-
setup(
|
|
589
|
-
emit:
|
|
590
|
-
slots:
|
|
596
|
+
setup(l, {
|
|
597
|
+
emit: v,
|
|
598
|
+
slots: h
|
|
591
599
|
}) {
|
|
592
600
|
const {
|
|
593
|
-
columns:
|
|
594
|
-
rowKey:
|
|
595
|
-
rowSelection:
|
|
596
|
-
expandable:
|
|
597
|
-
loadMore:
|
|
598
|
-
filterIconAlignLeft:
|
|
599
|
-
selectedKeys:
|
|
600
|
-
defaultSelectedKeys:
|
|
601
|
-
expandedKeys:
|
|
602
|
-
defaultExpandedKeys:
|
|
603
|
-
defaultExpandAllRows:
|
|
604
|
-
spanMethod:
|
|
605
|
-
draggable:
|
|
606
|
-
summarySpanMethod:
|
|
607
|
-
scrollbar:
|
|
608
|
-
showEmptyTree:
|
|
609
|
-
} =
|
|
610
|
-
t:
|
|
611
|
-
} =
|
|
612
|
-
...
|
|
613
|
-
...
|
|
601
|
+
columns: Xt,
|
|
602
|
+
rowKey: Ge,
|
|
603
|
+
rowSelection: Ce,
|
|
604
|
+
expandable: Zt,
|
|
605
|
+
loadMore: el,
|
|
606
|
+
filterIconAlignLeft: tl,
|
|
607
|
+
selectedKeys: ll,
|
|
608
|
+
defaultSelectedKeys: al,
|
|
609
|
+
expandedKeys: nl,
|
|
610
|
+
defaultExpandedKeys: rl,
|
|
611
|
+
defaultExpandAllRows: ol,
|
|
612
|
+
spanMethod: il,
|
|
613
|
+
draggable: Je,
|
|
614
|
+
summarySpanMethod: ul,
|
|
615
|
+
scrollbar: re,
|
|
616
|
+
showEmptyTree: Qe
|
|
617
|
+
} = va(l), d = Xa("table"), {
|
|
618
|
+
t: sl
|
|
619
|
+
} = Ja(), j = g(() => qe(l.bordered) ? {
|
|
620
|
+
...Qt,
|
|
621
|
+
...l.bordered
|
|
614
622
|
} : {
|
|
615
|
-
...
|
|
616
|
-
wrapper:
|
|
623
|
+
...Qt,
|
|
624
|
+
wrapper: l.bordered
|
|
617
625
|
}), {
|
|
618
|
-
children:
|
|
619
|
-
components:
|
|
620
|
-
} =
|
|
626
|
+
children: Xe,
|
|
627
|
+
components: dl
|
|
628
|
+
} = Ua("TableColumn"), ke = g(() => {
|
|
621
629
|
var e;
|
|
622
|
-
return ((e =
|
|
630
|
+
return ((e = Ce.value) == null ? void 0 : e.checkStrictly) ?? !0;
|
|
623
631
|
}), {
|
|
624
|
-
displayScrollbar:
|
|
625
|
-
scrollbarProps:
|
|
626
|
-
} =
|
|
627
|
-
var a, n, r,
|
|
628
|
-
const e = !!((a =
|
|
632
|
+
displayScrollbar: oe,
|
|
633
|
+
scrollbarProps: X
|
|
634
|
+
} = Qa(re), N = g(() => {
|
|
635
|
+
var a, n, r, i;
|
|
636
|
+
const e = !!((a = l.scroll) != null && a.x || (n = l.scroll) != null && n.minWidth), t = !!((r = l.scroll) != null && r.y || (i = l.scroll) != null && i.maxHeight);
|
|
629
637
|
return {
|
|
630
638
|
x: e,
|
|
631
|
-
y:
|
|
639
|
+
y: t
|
|
632
640
|
};
|
|
633
|
-
}),
|
|
634
|
-
componentRef:
|
|
635
|
-
elementRef:
|
|
636
|
-
} =
|
|
637
|
-
componentRef:
|
|
638
|
-
elementRef:
|
|
639
|
-
} =
|
|
640
|
-
componentRef:
|
|
641
|
-
elementRef:
|
|
642
|
-
} =
|
|
643
|
-
|
|
641
|
+
}), Re = A(), Z = A({}), {
|
|
642
|
+
componentRef: cl,
|
|
643
|
+
elementRef: fl
|
|
644
|
+
} = Ye("containerRef"), {
|
|
645
|
+
componentRef: ie,
|
|
646
|
+
elementRef: ue
|
|
647
|
+
} = Ye("containerRef"), {
|
|
648
|
+
componentRef: hl,
|
|
649
|
+
elementRef: Ze
|
|
650
|
+
} = Ye("containerRef"), _ = g(() => ee.value ? ue.value : fl.value), V = g(() => l.stickyHeader !== !1), vl = Za(), gl = `${ga()}-row-selection`, ee = g(() => N.value.y || V.value || !!l.virtualListProps || N.value.x && p.value.length === 0), Pe = _e(/* @__PURE__ */ new Map()), Le = A();
|
|
651
|
+
J([dl, Pe], ([e, t]) => {
|
|
644
652
|
if (e.length > 0) {
|
|
645
653
|
const a = [];
|
|
646
654
|
e.forEach((n) => {
|
|
647
|
-
const r =
|
|
655
|
+
const r = t.get(n);
|
|
648
656
|
r && a.push(r);
|
|
649
|
-
}),
|
|
657
|
+
}), Le.value = a;
|
|
650
658
|
} else
|
|
651
|
-
|
|
659
|
+
Le.value = void 0;
|
|
660
|
+
});
|
|
661
|
+
const se = /* @__PURE__ */ new Map(), m = A([]), Ae = A([]), {
|
|
662
|
+
resizingColumn: ml,
|
|
663
|
+
columnWidth: q,
|
|
664
|
+
handleThMouseDown: yl,
|
|
665
|
+
handleThKeyDown: bl
|
|
666
|
+
} = Na(Z, v, (e) => {
|
|
667
|
+
var t;
|
|
668
|
+
return ((t = se.get(e)) == null ? void 0 : t.minWidth) ?? 40;
|
|
652
669
|
});
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
handleThMouseDown: Ot
|
|
657
|
-
} = da($, d);
|
|
658
|
-
ne([pt, ce, D], ([e, l]) => {
|
|
659
|
-
const a = Gl(l ?? e ?? [], de, D);
|
|
660
|
-
v.value = a.dataColumns, fe.value = a.groupColumns;
|
|
670
|
+
J([Xt, Le, q], ([e, t]) => {
|
|
671
|
+
const a = ka(t ?? e ?? [], se, q);
|
|
672
|
+
m.value = a.dataColumns, Ae.value = a.groupColumns;
|
|
661
673
|
}, {
|
|
662
674
|
immediate: !0,
|
|
663
675
|
deep: !0
|
|
664
676
|
});
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
var n, r,
|
|
668
|
-
let e = !1,
|
|
669
|
-
((n =
|
|
670
|
-
for (const
|
|
671
|
-
|
|
672
|
-
e !==
|
|
677
|
+
const Ee = g(() => ["tl", "top", "tr"].includes(l.pagePosition)), te = A(!1), le = A(!1), Te = A(!1);
|
|
678
|
+
ma(() => {
|
|
679
|
+
var n, r, i;
|
|
680
|
+
let e = !1, t = !1, a = !1;
|
|
681
|
+
((n = l.rowSelection) != null && n.fixed || (r = l.expandable) != null && r.fixed || (i = l.draggable) != null && i.fixed) && (e = !0);
|
|
682
|
+
for (const o of m.value)
|
|
683
|
+
o.fixed === "left" ? (e = !0, a = !0) : o.fixed === "right" && (t = !0);
|
|
684
|
+
e !== te.value && (te.value = e), t !== le.value && (le.value = t), a !== Te.value && (Te.value = a);
|
|
673
685
|
});
|
|
674
|
-
const
|
|
675
|
-
for (const e of
|
|
686
|
+
const pl = g(() => {
|
|
687
|
+
for (const e of m.value)
|
|
676
688
|
if (e.ellipsis)
|
|
677
689
|
return !0;
|
|
678
690
|
return !1;
|
|
679
691
|
}), O = (e) => {
|
|
680
|
-
const
|
|
692
|
+
const t = {
|
|
681
693
|
type: e,
|
|
682
|
-
page:
|
|
683
|
-
pageSize:
|
|
684
|
-
sorter:
|
|
685
|
-
|
|
686
|
-
|
|
694
|
+
page: D.value,
|
|
695
|
+
pageSize: k.value,
|
|
696
|
+
sorter: lt.value,
|
|
697
|
+
sorters: de.value,
|
|
698
|
+
filters: Y.value,
|
|
699
|
+
dragTarget: e === "drag" ? S.data : void 0
|
|
687
700
|
};
|
|
688
|
-
|
|
689
|
-
},
|
|
690
|
-
|
|
691
|
-
...
|
|
692
|
-
[e]:
|
|
693
|
-
},
|
|
694
|
-
},
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
} : void 0, ge(), d("sorterChange", e, l), O("sorter");
|
|
701
|
+
v("change", ct.value, t, _t(E.value));
|
|
702
|
+
}, et = (e, t) => {
|
|
703
|
+
Sl.value = {
|
|
704
|
+
...Y.value,
|
|
705
|
+
[e]: t
|
|
706
|
+
}, $e(), v("filterChange", e, t), O("filter");
|
|
707
|
+
}, xl = (e, t) => {
|
|
708
|
+
kl(e, t), tt(e, t);
|
|
709
|
+
}, tt = (e, t) => {
|
|
710
|
+
$e(), v("sorterChange", e, t), O("sorter");
|
|
699
711
|
}, {
|
|
700
|
-
_filters:
|
|
701
|
-
computedFilters:
|
|
702
|
-
resetFilters:
|
|
703
|
-
clearFilters:
|
|
704
|
-
} =
|
|
705
|
-
columns:
|
|
706
|
-
onFilterChange:
|
|
712
|
+
_filters: Sl,
|
|
713
|
+
computedFilters: Y,
|
|
714
|
+
resetFilters: wl,
|
|
715
|
+
clearFilters: Cl
|
|
716
|
+
} = Va({
|
|
717
|
+
columns: m,
|
|
718
|
+
onFilterChange: et
|
|
707
719
|
}), {
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
720
|
+
computedSorter: lt,
|
|
721
|
+
computedSorters: de,
|
|
722
|
+
setSorter: kl,
|
|
723
|
+
resetSorters: Rl,
|
|
724
|
+
clearSorters: Pl
|
|
725
|
+
} = qa({
|
|
726
|
+
columns: m,
|
|
727
|
+
onSorterChange: tt
|
|
728
|
+
}), at = /* @__PURE__ */ new Set(), Ke = _e(/* @__PURE__ */ new WeakMap()), Ll = g(() => {
|
|
716
729
|
const e = [];
|
|
717
|
-
|
|
718
|
-
const
|
|
719
|
-
if (
|
|
720
|
-
for (const n of a)
|
|
721
|
-
e.push(n[
|
|
730
|
+
at.clear();
|
|
731
|
+
const t = (a) => {
|
|
732
|
+
if (Sa(a) && a.length > 0)
|
|
733
|
+
for (const n of a) {
|
|
734
|
+
e.push(n[Ge.value]), n.disabled && at.add(n[Ge.value]);
|
|
735
|
+
const r = n.children ?? Ke.get(n);
|
|
736
|
+
r && t(r);
|
|
737
|
+
}
|
|
722
738
|
};
|
|
723
|
-
return l
|
|
724
|
-
}),
|
|
725
|
-
const e = [],
|
|
739
|
+
return t(l.data), e;
|
|
740
|
+
}), Al = g(() => {
|
|
741
|
+
const e = [], t = (a) => {
|
|
726
742
|
for (const n of a)
|
|
727
|
-
e.push(n.key), n.children &&
|
|
743
|
+
e.push(n.key), n.children && t(n.children);
|
|
728
744
|
};
|
|
729
|
-
return
|
|
730
|
-
}),
|
|
731
|
-
const e = [],
|
|
745
|
+
return t(p.value), e;
|
|
746
|
+
}), nt = g(() => {
|
|
747
|
+
const e = [], t = (a) => {
|
|
732
748
|
for (const n of a)
|
|
733
|
-
n.disabled || e.push(n.key), n.children &&
|
|
749
|
+
!n.disabled && (ke.value || n.isLeaf) && e.push(n.key), n.children && t(n.children);
|
|
734
750
|
};
|
|
735
|
-
return
|
|
751
|
+
return t(p.value), e;
|
|
736
752
|
}), {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
753
|
+
isRadio: El,
|
|
754
|
+
selectedRowKeys: Tl,
|
|
755
|
+
currentSelectedRowKeys: De,
|
|
756
|
+
handleSelect: Kl,
|
|
757
|
+
handleSelectAllLeafs: Dl,
|
|
758
|
+
handleSelectAll: Bl,
|
|
759
|
+
select: $l,
|
|
760
|
+
selectAll: Ml,
|
|
761
|
+
clearSelected: zl
|
|
762
|
+
} = Ea({
|
|
763
|
+
selectedKeys: ll,
|
|
764
|
+
defaultSelectedKeys: al,
|
|
765
|
+
rowSelection: Ce,
|
|
766
|
+
currentAllRowKeys: Al,
|
|
767
|
+
currentAllEnabledRowKeys: nt,
|
|
768
|
+
emit: v
|
|
752
769
|
}), {
|
|
753
|
-
expandedRowKeys:
|
|
754
|
-
handleExpand:
|
|
755
|
-
expand:
|
|
756
|
-
expandAll:
|
|
757
|
-
} =
|
|
758
|
-
expandedKeys:
|
|
759
|
-
defaultExpandedKeys:
|
|
760
|
-
defaultExpandAllRows:
|
|
761
|
-
expandable:
|
|
762
|
-
allRowKeys:
|
|
763
|
-
emit:
|
|
764
|
-
}),
|
|
765
|
-
e && (
|
|
766
|
-
},
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
770
|
+
expandedRowKeys: ce,
|
|
771
|
+
handleExpand: Fl,
|
|
772
|
+
expand: Wl,
|
|
773
|
+
expandAll: Ol
|
|
774
|
+
} = Ta({
|
|
775
|
+
expandedKeys: nl,
|
|
776
|
+
defaultExpandedKeys: rl,
|
|
777
|
+
defaultExpandAllRows: ol,
|
|
778
|
+
expandable: Zt,
|
|
779
|
+
allRowKeys: Ll,
|
|
780
|
+
emit: v
|
|
781
|
+
}), rt = (e, t) => {
|
|
782
|
+
e && Ke.set(t.raw, e);
|
|
783
|
+
}, Be = /* @__PURE__ */ new WeakMap();
|
|
784
|
+
let ot = !0;
|
|
785
|
+
It(() => {
|
|
786
|
+
ot = !1;
|
|
787
|
+
});
|
|
788
|
+
const Il = (e) => {
|
|
789
|
+
const t = Be.get(e.raw);
|
|
790
|
+
if (t) return t;
|
|
791
|
+
const a = new Promise((n, r) => {
|
|
792
|
+
var i;
|
|
793
|
+
Promise.resolve((i = l.loadMore) == null ? void 0 : i.call(l, e.raw, n)).catch(r);
|
|
794
|
+
}).then((n) => (ot && rt(n, e), n)).finally(() => Be.delete(e.raw));
|
|
795
|
+
return Be.set(e.raw, a), a;
|
|
796
|
+
}, Hl = (e) => {
|
|
797
|
+
var t, a;
|
|
798
|
+
for (const n of Object.keys(Y.value)) {
|
|
799
|
+
const r = Y.value[n], i = se.get(n);
|
|
800
|
+
if (i && ((t = i.filterable) != null && t.filter) && r.length > 0) {
|
|
801
|
+
const o = (a = i.filterable) == null ? void 0 : a.filter(r, e.raw);
|
|
802
|
+
if (!o)
|
|
803
|
+
return o;
|
|
774
804
|
}
|
|
775
805
|
}
|
|
776
806
|
return !0;
|
|
777
807
|
}, {
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
808
|
+
beginDrag: it,
|
|
809
|
+
clearDragState: ut,
|
|
810
|
+
dragType: T,
|
|
811
|
+
dragState: S,
|
|
812
|
+
handleDragStart: jl,
|
|
813
|
+
handleDragEnter: Nl,
|
|
814
|
+
handleDragover: _l,
|
|
815
|
+
handleDragEnd: Vl,
|
|
816
|
+
handleDrop: ql
|
|
817
|
+
} = ja(Je), st = g(() => {
|
|
818
|
+
const e = (t) => {
|
|
787
819
|
const a = [];
|
|
788
|
-
for (const n of
|
|
820
|
+
for (const n of t) {
|
|
789
821
|
const r = {
|
|
790
822
|
raw: n,
|
|
791
|
-
key: n[
|
|
823
|
+
key: n[l.rowKey],
|
|
792
824
|
disabled: n.disabled,
|
|
793
825
|
expand: n.expand,
|
|
794
826
|
isLeaf: n.isLeaf
|
|
795
827
|
};
|
|
796
|
-
|
|
828
|
+
if (n.children)
|
|
829
|
+
r.isLeaf = n.children.length === 0, r.children = e(n.children);
|
|
830
|
+
else if (l.loadMore && !n.isLeaf) {
|
|
831
|
+
r.isLeaf = !1;
|
|
832
|
+
const i = Ke.get(n);
|
|
833
|
+
i && (r.children = e(i), r.isLeaf = i.length === 0);
|
|
834
|
+
} else
|
|
835
|
+
r.isLeaf = !0;
|
|
836
|
+
r.hasSubtree = !!(r.children ? !l.hideExpandButtonOnEmpty || r.children.length > 0 : l.loadMore && !r.isLeaf), a.push(r);
|
|
797
837
|
}
|
|
798
838
|
return a;
|
|
799
839
|
};
|
|
800
|
-
return e(
|
|
801
|
-
}),
|
|
802
|
-
const e = (
|
|
840
|
+
return e(l.data ?? []);
|
|
841
|
+
}), dt = g(() => {
|
|
842
|
+
const e = (t) => t.reduce((a, n) => (Hl(n) && a.push({
|
|
803
843
|
...n,
|
|
804
844
|
children: n.children ? e(n.children) : void 0
|
|
805
845
|
}), a), []);
|
|
806
|
-
return Object.keys(
|
|
807
|
-
}),
|
|
808
|
-
var
|
|
809
|
-
const e =
|
|
846
|
+
return Object.keys(Y.value).length > 0 ? e(st.value) : st.value;
|
|
847
|
+
}), E = g(() => {
|
|
848
|
+
var t;
|
|
849
|
+
const e = Ra(dt.value);
|
|
810
850
|
if (e.length > 0) {
|
|
811
|
-
if (
|
|
812
|
-
const
|
|
813
|
-
|
|
814
|
-
const {
|
|
815
|
-
field:
|
|
816
|
-
direction:
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
const
|
|
821
|
-
if ((
|
|
822
|
-
|
|
823
|
-
dataIndex:
|
|
824
|
-
direction:
|
|
851
|
+
if (de.value.length) {
|
|
852
|
+
const r = (o, u) => {
|
|
853
|
+
var f, x;
|
|
854
|
+
for (const {
|
|
855
|
+
field: R,
|
|
856
|
+
direction: K
|
|
857
|
+
} of de.value) {
|
|
858
|
+
const P = se.get(R);
|
|
859
|
+
if (!P || ((f = P.sortable) == null ? void 0 : f.sorter) === !0) continue;
|
|
860
|
+
const z = Ue(o.raw, R), H = Ue(u.raw, R);
|
|
861
|
+
if ((x = P.sortable) != null && x.sorter && Q(P.sortable.sorter)) {
|
|
862
|
+
const c = P.sortable.sorter(o.raw, u.raw, {
|
|
863
|
+
dataIndex: R,
|
|
864
|
+
direction: K
|
|
825
865
|
});
|
|
826
|
-
|
|
827
|
-
|
|
866
|
+
if (c) return c;
|
|
867
|
+
continue;
|
|
868
|
+
}
|
|
869
|
+
const y = z === H ? 0 : z > H ? 1 : -1;
|
|
870
|
+
if (y) return K === "descend" ? -y : y;
|
|
871
|
+
}
|
|
872
|
+
return 0;
|
|
873
|
+
}, i = (o) => {
|
|
874
|
+
o.sort(r), o.forEach((u) => {
|
|
875
|
+
u.children && i(u.children);
|
|
828
876
|
});
|
|
829
|
-
}
|
|
877
|
+
};
|
|
878
|
+
i(e);
|
|
830
879
|
}
|
|
831
880
|
const {
|
|
832
|
-
sourcePath:
|
|
833
|
-
targetPath:
|
|
834
|
-
} =
|
|
835
|
-
if (
|
|
836
|
-
let
|
|
837
|
-
for (let
|
|
838
|
-
const
|
|
839
|
-
if (
|
|
840
|
-
const
|
|
841
|
-
|
|
881
|
+
sourcePath: a,
|
|
882
|
+
targetPath: n
|
|
883
|
+
} = S;
|
|
884
|
+
if (S.dragging && n.length && n.toString() !== a.toString() && a.length === n.length && a.slice(0, -1).toString() === n.slice(0, -1).toString()) {
|
|
885
|
+
let r = e;
|
|
886
|
+
for (let i = 0; i < a.length; i++) {
|
|
887
|
+
const o = a[i];
|
|
888
|
+
if (i >= a.length - 1) {
|
|
889
|
+
const f = r[o], x = n[i];
|
|
890
|
+
if (!f || !r[x]) break;
|
|
891
|
+
x > o ? (r.splice(x + 1, 0, f), r.splice(o, 1)) : (r.splice(x, 0, f), r.splice(o + 1, 1));
|
|
842
892
|
} else
|
|
843
|
-
|
|
893
|
+
r = ((t = r[o]) == null ? void 0 : t.children) ?? [];
|
|
844
894
|
}
|
|
845
895
|
}
|
|
846
896
|
}
|
|
847
897
|
return e;
|
|
848
898
|
}), {
|
|
849
|
-
page:
|
|
850
|
-
pageSize:
|
|
851
|
-
handlePageChange:
|
|
852
|
-
handlePageSizeChange:
|
|
853
|
-
resetPage:
|
|
854
|
-
clampPage:
|
|
855
|
-
} =
|
|
856
|
-
|
|
899
|
+
page: D,
|
|
900
|
+
pageSize: k,
|
|
901
|
+
handlePageChange: Yl,
|
|
902
|
+
handlePageSizeChange: Ul,
|
|
903
|
+
resetPage: $e,
|
|
904
|
+
clampPage: Gl
|
|
905
|
+
} = Ka(l, v);
|
|
906
|
+
J(() => [E.value.length, k.value], ([e]) => Gl(e), {
|
|
857
907
|
immediate: !0
|
|
858
908
|
});
|
|
859
909
|
const {
|
|
860
|
-
mergedSize:
|
|
861
|
-
} =
|
|
910
|
+
mergedSize: Jl
|
|
911
|
+
} = Ga(Ht(l, "size"), {
|
|
862
912
|
defaultValue: "large"
|
|
863
|
-
}),
|
|
913
|
+
}), Ql = g(() => {
|
|
864
914
|
var e;
|
|
865
|
-
return ((e =
|
|
915
|
+
return ((e = Ce.value) == null ? void 0 : e.onlyCurrent) ?? !1;
|
|
866
916
|
});
|
|
867
|
-
|
|
868
|
-
e !==
|
|
917
|
+
J(D, (e, t) => {
|
|
918
|
+
e !== t && Ql.value && zl();
|
|
869
919
|
});
|
|
870
|
-
const
|
|
871
|
-
if (
|
|
920
|
+
const p = g(() => l.pagination && E.value.length > k.value ? E.value.slice((D.value - 1) * k.value, D.value * k.value) : E.value), ct = g(() => _t(p.value)), Xl = () => m.value.reduce((e, t, a) => {
|
|
921
|
+
if (t.dataIndex)
|
|
872
922
|
if (a === 0)
|
|
873
|
-
|
|
923
|
+
Jt(e, t.dataIndex, l.summaryText ?? sl("table.summaryText"), {
|
|
874
924
|
addPath: !0
|
|
875
925
|
});
|
|
876
926
|
else {
|
|
877
927
|
let n = 0, r = !1;
|
|
878
|
-
|
|
879
|
-
if (
|
|
880
|
-
const
|
|
881
|
-
|
|
928
|
+
p.value.forEach((i) => {
|
|
929
|
+
if (t.dataIndex) {
|
|
930
|
+
const o = Ue(i.raw, t.dataIndex);
|
|
931
|
+
W(o) ? n += o : !wa(o) && !Ca(o) && (r = !0);
|
|
882
932
|
}
|
|
883
|
-
}),
|
|
933
|
+
}), Jt(e, t.dataIndex, r ? "" : n, {
|
|
884
934
|
addPath: !0
|
|
885
935
|
});
|
|
886
936
|
}
|
|
887
937
|
return e;
|
|
888
|
-
}, {}),
|
|
889
|
-
raw:
|
|
890
|
-
key: l
|
|
891
|
-
})) : [],
|
|
892
|
-
columns:
|
|
893
|
-
data:
|
|
894
|
-
})) :
|
|
895
|
-
let e = !0,
|
|
896
|
-
const a =
|
|
897
|
-
a && (e =
|
|
898
|
-
},
|
|
938
|
+
}, {}), ft = (e) => e && e.length > 0 ? e.map((t) => ({
|
|
939
|
+
raw: t,
|
|
940
|
+
key: t[l.rowKey]
|
|
941
|
+
})) : [], $ = g(() => l.summary ? Q(l.summary) ? ft(l.summary({
|
|
942
|
+
columns: m.value,
|
|
943
|
+
data: ct.value
|
|
944
|
+
})) : ft([Xl()]) : []), fe = A(0), he = A(!0), ve = A(!0), Me = () => {
|
|
945
|
+
let e = !0, t = !0;
|
|
946
|
+
const a = _.value;
|
|
947
|
+
a && (e = fe.value === 0, t = Math.ceil(fe.value + a.offsetWidth) >= a.scrollWidth), e !== he.value && (he.value = e), t !== ve.value && (ve.value = t);
|
|
948
|
+
}, Zl = () => he.value && ve.value ? d.modifier("scroll-position-both") : he.value ? d.modifier("scroll-position-left") : ve.value ? d.modifier("scroll-position-right") : d.modifier("scroll-position-middle"), ea = () => {
|
|
899
949
|
const e = [];
|
|
900
|
-
return
|
|
901
|
-
},
|
|
902
|
-
e.target.scrollLeft !==
|
|
903
|
-
},
|
|
904
|
-
|
|
950
|
+
return te.value && e.push(d.modifier("has-fixed-col-left")), le.value && e.push(d.modifier("has-fixed-col-right")), e;
|
|
951
|
+
}, ht = (e) => {
|
|
952
|
+
e.target.scrollLeft !== fe.value && (fe.value = e.target.scrollLeft), Me();
|
|
953
|
+
}, vt = (e) => {
|
|
954
|
+
ht(e);
|
|
905
955
|
const {
|
|
906
|
-
scrollLeft:
|
|
956
|
+
scrollLeft: t
|
|
907
957
|
} = e.target;
|
|
908
|
-
|
|
909
|
-
},
|
|
910
|
-
|
|
911
|
-
},
|
|
912
|
-
|
|
913
|
-
},
|
|
914
|
-
|
|
915
|
-
},
|
|
916
|
-
|
|
917
|
-
},
|
|
918
|
-
|
|
919
|
-
}, 30),
|
|
920
|
-
|
|
921
|
-
}, 30),
|
|
922
|
-
|
|
923
|
-
},
|
|
924
|
-
|
|
925
|
-
},
|
|
926
|
-
|
|
927
|
-
},
|
|
928
|
-
var
|
|
929
|
-
const e = [],
|
|
958
|
+
Ze.value && (Ze.value.scrollLeft = t), Re.value && (Re.value.scrollLeft = t);
|
|
959
|
+
}, gt = (e, t) => {
|
|
960
|
+
v("rowClick", e.raw, t);
|
|
961
|
+
}, ta = (e, t) => {
|
|
962
|
+
v("rowDblclick", e.raw, t);
|
|
963
|
+
}, la = (e, t) => {
|
|
964
|
+
v("rowContextmenu", e.raw, t);
|
|
965
|
+
}, mt = (e, t, a) => {
|
|
966
|
+
v("cellClick", e.raw, t, a);
|
|
967
|
+
}, yt = Nt((e, t, a) => {
|
|
968
|
+
v("cellMouseEnter", e.raw, t, a);
|
|
969
|
+
}, 30), bt = Nt((e, t, a) => {
|
|
970
|
+
v("cellMouseLeave", e.raw, t, a);
|
|
971
|
+
}, 30), pt = (e, t, a) => {
|
|
972
|
+
v("cellDblclick", e.raw, t, a);
|
|
973
|
+
}, xt = (e, t, a) => {
|
|
974
|
+
v("cellContextmenu", e.raw, t, a);
|
|
975
|
+
}, aa = (e, t) => {
|
|
976
|
+
v("headerClick", e, t);
|
|
977
|
+
}, b = g(() => {
|
|
978
|
+
var o, u;
|
|
979
|
+
const e = [], t = te.value || le.value;
|
|
930
980
|
let a, n, r;
|
|
931
|
-
((
|
|
981
|
+
((o = l.draggable) == null ? void 0 : o.type) === "handle" && (a = {
|
|
932
982
|
name: "drag-handle",
|
|
933
|
-
title:
|
|
934
|
-
width:
|
|
935
|
-
fixed:
|
|
936
|
-
}, e.push(a)),
|
|
983
|
+
title: l.draggable.title,
|
|
984
|
+
width: l.draggable.width,
|
|
985
|
+
fixed: l.draggable.fixed || t
|
|
986
|
+
}, e.push(a)), l.expandable && (n = {
|
|
937
987
|
name: "expand",
|
|
938
|
-
title:
|
|
939
|
-
width:
|
|
940
|
-
fixed:
|
|
941
|
-
}, e.push(n)),
|
|
942
|
-
name:
|
|
943
|
-
title:
|
|
944
|
-
width:
|
|
945
|
-
fixed:
|
|
946
|
-
}, e.push(r)), !
|
|
947
|
-
const
|
|
948
|
-
return
|
|
988
|
+
title: l.expandable.title,
|
|
989
|
+
width: l.expandable.width,
|
|
990
|
+
fixed: l.expandable.fixed || t
|
|
991
|
+
}, e.push(n)), l.rowSelection && (r = {
|
|
992
|
+
name: l.rowSelection.type === "radio" ? "selection-radio" : "selection-checkbox",
|
|
993
|
+
title: l.rowSelection.title,
|
|
994
|
+
width: l.rowSelection.width,
|
|
995
|
+
fixed: l.rowSelection.fixed || t
|
|
996
|
+
}, e.push(r)), !Te.value && e.length > 0 && e[e.length - 1].fixed && (e[e.length - 1].isLastLeftFixed = !0);
|
|
997
|
+
const i = (u = l.components) == null ? void 0 : u.operations;
|
|
998
|
+
return Q(i) ? i({
|
|
949
999
|
dragHandle: a,
|
|
950
1000
|
expand: n,
|
|
951
1001
|
selection: r
|
|
952
1002
|
}) : e;
|
|
953
|
-
}),
|
|
954
|
-
var e,
|
|
955
|
-
if (
|
|
1003
|
+
}), na = g(() => {
|
|
1004
|
+
var e, t, a, n;
|
|
1005
|
+
if (N.value.x) {
|
|
956
1006
|
const r = {
|
|
957
|
-
width:
|
|
1007
|
+
width: W((e = l.scroll) == null ? void 0 : e.x) ? `${(t = l.scroll) == null ? void 0 : t.x}px` : (a = l.scroll) == null ? void 0 : a.x
|
|
958
1008
|
};
|
|
959
|
-
return (n =
|
|
1009
|
+
return (n = l.scroll) != null && n.minWidth && (r.minWidth = W(l.scroll.minWidth) ? `${l.scroll.minWidth}px` : l.scroll.minWidth), r;
|
|
960
1010
|
}
|
|
961
|
-
}),
|
|
962
|
-
var e,
|
|
963
|
-
if (
|
|
1011
|
+
}), ge = g(() => {
|
|
1012
|
+
var e, t, a, n;
|
|
1013
|
+
if (N.value.x && p.value.length > 0) {
|
|
964
1014
|
const r = {
|
|
965
|
-
width:
|
|
1015
|
+
width: W((e = l.scroll) == null ? void 0 : e.x) ? `${(t = l.scroll) == null ? void 0 : t.x}px` : (a = l.scroll) == null ? void 0 : a.x
|
|
966
1016
|
};
|
|
967
|
-
return (n =
|
|
1017
|
+
return (n = l.scroll) != null && n.minWidth && (r.minWidth = W(l.scroll.minWidth) ? `${l.scroll.minWidth}px` : l.scroll.minWidth), r;
|
|
968
1018
|
}
|
|
969
1019
|
});
|
|
970
|
-
|
|
971
|
-
loadMore:
|
|
972
|
-
addLazyLoadData:
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1020
|
+
ya(_a, _e({
|
|
1021
|
+
loadMore: el,
|
|
1022
|
+
addLazyLoadData: rt,
|
|
1023
|
+
loadChildren: Il,
|
|
1024
|
+
slots: h,
|
|
1025
|
+
sorter: lt,
|
|
1026
|
+
sorters: de,
|
|
1027
|
+
filters: Y,
|
|
1028
|
+
filterIconAlignLeft: tl,
|
|
1029
|
+
resizingColumn: ml,
|
|
1030
|
+
selectionName: gl,
|
|
1031
|
+
checkStrictly: ke,
|
|
1032
|
+
currentAllEnabledRowKeys: nt,
|
|
1033
|
+
currentSelectedRowKeys: De,
|
|
1034
|
+
expandedRowKeys: ce,
|
|
1035
|
+
addColumn: (e, t) => {
|
|
1036
|
+
Pe.set(e, t);
|
|
983
1037
|
},
|
|
984
1038
|
removeColumn: (e) => {
|
|
985
|
-
|
|
1039
|
+
Pe.delete(e);
|
|
986
1040
|
},
|
|
987
|
-
onSelectAll:
|
|
988
|
-
onSelect:
|
|
989
|
-
onSelectAllLeafs:
|
|
990
|
-
onSorterChange:
|
|
991
|
-
onFilterChange:
|
|
992
|
-
onThMouseDown:
|
|
1041
|
+
onSelectAll: Bl,
|
|
1042
|
+
onSelect: Kl,
|
|
1043
|
+
onSelectAllLeafs: Dl,
|
|
1044
|
+
onSorterChange: xl,
|
|
1045
|
+
onFilterChange: et,
|
|
1046
|
+
onThMouseDown: yl,
|
|
1047
|
+
onThKeyDown: bl
|
|
993
1048
|
}));
|
|
994
|
-
const
|
|
995
|
-
[
|
|
996
|
-
[
|
|
997
|
-
[
|
|
998
|
-
[
|
|
999
|
-
[
|
|
1000
|
-
[
|
|
1001
|
-
[
|
|
1002
|
-
[
|
|
1003
|
-
[
|
|
1004
|
-
[
|
|
1005
|
-
|
|
1006
|
-
[
|
|
1007
|
-
|
|
1008
|
-
[
|
|
1009
|
-
[
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1049
|
+
const St = g(() => [d.block, d.modifier(`size-${Jl.value}`), {
|
|
1050
|
+
[d.modifier("border")]: j.value.wrapper,
|
|
1051
|
+
[d.modifier("border-cell")]: j.value.cell,
|
|
1052
|
+
[d.modifier("border-header-cell")]: !j.value.cell && j.value.headerCell,
|
|
1053
|
+
[d.modifier("border-body-cell")]: !j.value.cell && j.value.bodyCell,
|
|
1054
|
+
[d.modifier("stripe")]: l.stripe,
|
|
1055
|
+
[d.modifier("hover")]: l.hoverable,
|
|
1056
|
+
[d.modifier("dragging")]: S.dragging,
|
|
1057
|
+
[d.modifier("type-selection")]: !!l.rowSelection,
|
|
1058
|
+
[d.modifier("empty")]: l.data && p.value.length === 0,
|
|
1059
|
+
[d.modifier("layout-fixed")]: l.tableLayoutFixed || N.value.x || ee.value || pl.value,
|
|
1060
|
+
[d.modifier("virtualized")]: U.value,
|
|
1061
|
+
[d.modifier("sticky-header")]: V.value
|
|
1062
|
+
}]), ra = g(() => [d.modifier("pagination"), {
|
|
1063
|
+
[d.modifier("pagination-left")]: l.pagePosition === "tl" || l.pagePosition === "bl",
|
|
1064
|
+
[d.modifier("pagination-center")]: l.pagePosition === "top" || l.pagePosition === "bottom",
|
|
1065
|
+
[d.modifier("pagination-right")]: l.pagePosition === "tr" || l.pagePosition === "br",
|
|
1066
|
+
[d.modifier("pagination-top")]: Ee.value
|
|
1067
|
+
}]), oa = g(() => {
|
|
1068
|
+
const e = ea();
|
|
1069
|
+
return N.value.x && e.push(Zl()), ee.value && e.push(d.modifier("scroll-y")), e;
|
|
1070
|
+
}), U = g(() => !!l.virtualListProps && !l.spanMethod), I = A({}), ze = g(() => m.value.map((e) => ({
|
|
1071
|
+
...e,
|
|
1072
|
+
_resizeWidth: e.dataIndex && I.value[e.dataIndex] > 0 ? I.value[e.dataIndex] : e._resizeWidth
|
|
1073
|
+
}))), G = g(() => b.value.map((e) => ({
|
|
1074
|
+
...e,
|
|
1075
|
+
width: I.value[e.name] > 0 ? I.value[e.name] : e.width
|
|
1076
|
+
}))), me = () => {
|
|
1014
1077
|
const e = {};
|
|
1015
|
-
for (const
|
|
1016
|
-
e[
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1078
|
+
for (const a of Object.keys(Z.value))
|
|
1079
|
+
e[a] = Z.value[a].getBoundingClientRect().width;
|
|
1080
|
+
const t = _.value;
|
|
1081
|
+
for (const a of (t == null ? void 0 : t.querySelectorAll("[data-x-table-column]")) ?? []) {
|
|
1082
|
+
const n = a.dataset.xTableColumn;
|
|
1083
|
+
n && !e[n] && a.getAttribute("colspan") === null && (e[n] = a.getBoundingClientRect().width);
|
|
1084
|
+
}
|
|
1085
|
+
I.value = e;
|
|
1086
|
+
};
|
|
1087
|
+
J([m, b, () => l.showHeader], () => {
|
|
1088
|
+
jt(() => me());
|
|
1089
|
+
}, {
|
|
1090
|
+
flush: "post"
|
|
1091
|
+
});
|
|
1092
|
+
const ae = A(!1), wt = () => ue.value ? ue.value.offsetWidth > ue.value.clientWidth : !1, ia = () => {
|
|
1093
|
+
const e = wt();
|
|
1094
|
+
ae.value !== e && (ae.value = e), Me(), me();
|
|
1021
1095
|
};
|
|
1022
|
-
|
|
1023
|
-
|
|
1096
|
+
ba(() => {
|
|
1097
|
+
ae.value = wt(), me();
|
|
1024
1098
|
});
|
|
1025
|
-
const
|
|
1026
|
-
loading:
|
|
1027
|
-
|
|
1028
|
-
}), et = () => u(U, {
|
|
1099
|
+
const Fe = g(() => qe(l.loading) ? l.loading : {
|
|
1100
|
+
loading: l.loading
|
|
1101
|
+
}), Ct = () => s(ne, {
|
|
1029
1102
|
empty: !0
|
|
1030
1103
|
}, {
|
|
1031
|
-
default: () => [
|
|
1032
|
-
colSpan:
|
|
1104
|
+
default: () => [s(we, {
|
|
1105
|
+
colSpan: m.value.length + b.value.length
|
|
1033
1106
|
}, {
|
|
1034
1107
|
default: () => {
|
|
1035
1108
|
var e;
|
|
1036
|
-
return [((e =
|
|
1109
|
+
return [((e = h.empty) == null ? void 0 : e.call(h)) ?? s(za, {
|
|
1037
1110
|
component: "table"
|
|
1038
1111
|
}, null)];
|
|
1039
1112
|
}
|
|
1040
1113
|
})]
|
|
1041
|
-
}),
|
|
1042
|
-
var
|
|
1114
|
+
}), We = (e) => {
|
|
1115
|
+
var t;
|
|
1043
1116
|
if (e.expand)
|
|
1044
|
-
return
|
|
1045
|
-
if (
|
|
1046
|
-
return
|
|
1117
|
+
return Q(e.expand) ? e.expand() : e.expand;
|
|
1118
|
+
if (h["expand-row"])
|
|
1119
|
+
return h["expand-row"]({
|
|
1047
1120
|
record: e.raw
|
|
1048
1121
|
});
|
|
1049
|
-
if ((
|
|
1050
|
-
return
|
|
1051
|
-
},
|
|
1052
|
-
tableSpan:
|
|
1053
|
-
removedCells:
|
|
1054
|
-
} =
|
|
1055
|
-
spanMethod:
|
|
1056
|
-
data:
|
|
1057
|
-
columns:
|
|
1122
|
+
if ((t = l.expandable) != null && t.expandedRowRender)
|
|
1123
|
+
return l.expandable.expandedRowRender(e.raw);
|
|
1124
|
+
}, kt = g(() => [].concat(b.value, m.value)), ua = g(() => l.spanAll ? kt.value : m.value), {
|
|
1125
|
+
tableSpan: Rt,
|
|
1126
|
+
removedCells: ye
|
|
1127
|
+
} = Ut({
|
|
1128
|
+
spanMethod: il,
|
|
1129
|
+
data: p,
|
|
1130
|
+
columns: ua
|
|
1058
1131
|
}), {
|
|
1059
|
-
tableSpan:
|
|
1060
|
-
removedCells:
|
|
1061
|
-
} =
|
|
1062
|
-
spanMethod:
|
|
1063
|
-
data:
|
|
1064
|
-
columns:
|
|
1065
|
-
}),
|
|
1066
|
-
if (!(!
|
|
1132
|
+
tableSpan: Pt,
|
|
1133
|
+
removedCells: Lt
|
|
1134
|
+
} = Ut({
|
|
1135
|
+
spanMethod: ul,
|
|
1136
|
+
data: $,
|
|
1137
|
+
columns: kt
|
|
1138
|
+
}), be = (e) => {
|
|
1139
|
+
if (!(!U.value || !e || !I.value[e]))
|
|
1067
1140
|
return {
|
|
1068
|
-
width: `${
|
|
1141
|
+
width: `${I.value[e]}px`
|
|
1069
1142
|
};
|
|
1070
|
-
},
|
|
1071
|
-
key: `table-summary-${
|
|
1072
|
-
class: [
|
|
1073
|
-
onClick: (a) =>
|
|
1143
|
+
}, sa = (e, t) => s(ne, {
|
|
1144
|
+
key: `table-summary-${t}`,
|
|
1145
|
+
class: [d.element("tr-summary"), Q(l.rowClass) ? l.rowClass(e.raw, t) : l.rowClass],
|
|
1146
|
+
onClick: (a) => gt(e, a)
|
|
1074
1147
|
}, {
|
|
1075
|
-
default: () => [
|
|
1076
|
-
const r = `${
|
|
1077
|
-
if (
|
|
1148
|
+
default: () => [b.value.map((a, n) => {
|
|
1149
|
+
const r = `${t}-${n}-${e.key}`, [i, o] = Pt.value[r] ?? [1, 1];
|
|
1150
|
+
if (Lt.value.includes(r))
|
|
1078
1151
|
return null;
|
|
1079
|
-
const
|
|
1080
|
-
return
|
|
1081
|
-
style:
|
|
1152
|
+
const u = be(a.name);
|
|
1153
|
+
return s(Vt, {
|
|
1154
|
+
style: u,
|
|
1082
1155
|
operationColumn: a,
|
|
1083
|
-
operations:
|
|
1156
|
+
operations: G.value,
|
|
1084
1157
|
record: e,
|
|
1085
|
-
rowSpan:
|
|
1086
|
-
colSpan:
|
|
1158
|
+
rowSpan: i,
|
|
1159
|
+
colSpan: o,
|
|
1087
1160
|
summary: !0
|
|
1088
1161
|
}, null);
|
|
1089
|
-
}),
|
|
1090
|
-
const r = `${
|
|
1091
|
-
if (
|
|
1162
|
+
}), m.value.map((a, n) => {
|
|
1163
|
+
const r = `${t}-${b.value.length + n}-${e.key}`, [i, o] = Pt.value[r] ?? [1, 1];
|
|
1164
|
+
if (Lt.value.includes(r))
|
|
1092
1165
|
return null;
|
|
1093
|
-
const
|
|
1094
|
-
return
|
|
1166
|
+
const u = be(a.dataIndex);
|
|
1167
|
+
return s(we, {
|
|
1095
1168
|
key: `td-${r}`,
|
|
1096
|
-
style:
|
|
1097
|
-
rowIndex:
|
|
1169
|
+
style: u,
|
|
1170
|
+
rowIndex: t,
|
|
1098
1171
|
record: e,
|
|
1099
1172
|
column: a,
|
|
1100
|
-
operations:
|
|
1101
|
-
dataColumns:
|
|
1102
|
-
rowSpan:
|
|
1103
|
-
colSpan:
|
|
1173
|
+
operations: G.value,
|
|
1174
|
+
dataColumns: ze.value,
|
|
1175
|
+
rowSpan: i,
|
|
1176
|
+
colSpan: o,
|
|
1104
1177
|
summary: !0,
|
|
1105
|
-
onClick: (
|
|
1106
|
-
onDblclick: (
|
|
1107
|
-
onMouseenter: (
|
|
1108
|
-
onMouseleave: (
|
|
1109
|
-
onContextmenu: (
|
|
1178
|
+
onClick: (f) => mt(e, a, f),
|
|
1179
|
+
onDblclick: (f) => pt(e, a, f),
|
|
1180
|
+
onMouseenter: (f) => yt(e, a, f),
|
|
1181
|
+
onMouseleave: (f) => bt(e, a, f),
|
|
1182
|
+
onContextmenu: (f) => xt(e, a, f)
|
|
1110
1183
|
}, {
|
|
1111
|
-
td:
|
|
1112
|
-
cell:
|
|
1184
|
+
td: h.td,
|
|
1185
|
+
cell: h["summary-cell"]
|
|
1113
1186
|
});
|
|
1114
1187
|
})],
|
|
1115
|
-
tr:
|
|
1116
|
-
}),
|
|
1117
|
-
var
|
|
1118
|
-
const
|
|
1119
|
-
return
|
|
1188
|
+
tr: h.tr
|
|
1189
|
+
}), At = () => $.value && $.value.length > 0 ? s("tfoot", null, [$.value.map((e, t) => sa(e, t))]) : null, Et = (e, t = !0, a = !1) => {
|
|
1190
|
+
var i, o, u;
|
|
1191
|
+
const n = e.key, r = ce.value.includes(n);
|
|
1192
|
+
return s("button", {
|
|
1120
1193
|
type: "button",
|
|
1121
|
-
class:
|
|
1122
|
-
|
|
1123
|
-
|
|
1194
|
+
class: d.element("expand-btn"),
|
|
1195
|
+
"aria-expanded": r,
|
|
1196
|
+
"aria-busy": a || void 0,
|
|
1197
|
+
"aria-disabled": a || void 0,
|
|
1198
|
+
"aria-label": vl(r ? "collapseRowText" : "expandRowText", {
|
|
1199
|
+
row: e.key
|
|
1200
|
+
}),
|
|
1201
|
+
onClick: (f) => {
|
|
1202
|
+
if (a) {
|
|
1203
|
+
f.stopPropagation();
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
(!e.hasSubtree || e.children || !r) && Fl(n, e.raw), t && f.stopPropagation();
|
|
1124
1207
|
}
|
|
1125
|
-
}, [((
|
|
1126
|
-
expanded:
|
|
1208
|
+
}, [a ? s(en, null, null) : ((i = h["expand-icon"]) == null ? void 0 : i.call(h, {
|
|
1209
|
+
expanded: r,
|
|
1127
1210
|
record: e.raw
|
|
1128
|
-
})) ?? ((
|
|
1129
|
-
},
|
|
1130
|
-
indentSize:
|
|
1211
|
+
})) ?? ((u = (o = l.expandable) == null ? void 0 : o.icon) == null ? void 0 : u.call(o, r, e.raw)) ?? (r ? s(Ba, null, null) : s(Da, null, null))]);
|
|
1212
|
+
}, Tt = (e, {
|
|
1213
|
+
indentSize: t,
|
|
1131
1214
|
indexPath: a,
|
|
1132
1215
|
allowDrag: n,
|
|
1133
1216
|
expandContent: r
|
|
1134
1217
|
}) => {
|
|
1135
|
-
var
|
|
1218
|
+
var i, o;
|
|
1136
1219
|
if (e.hasSubtree)
|
|
1137
|
-
return ((
|
|
1138
|
-
indentSize:
|
|
1220
|
+
return ((i = e.children) == null ? void 0 : i.length) === 0 && Qe.value ? Ct() : (o = e.children) == null ? void 0 : o.map((u, f) => Oe(u, f, {
|
|
1221
|
+
indentSize: t,
|
|
1139
1222
|
indexPath: a,
|
|
1140
1223
|
allowDrag: n
|
|
1141
1224
|
}));
|
|
1142
1225
|
if (r) {
|
|
1143
|
-
const
|
|
1144
|
-
return
|
|
1226
|
+
const u = _.value;
|
|
1227
|
+
return s(ne, {
|
|
1145
1228
|
key: `${e.key}-expand`,
|
|
1146
1229
|
expand: !0
|
|
1147
1230
|
}, {
|
|
1148
|
-
default: () => [
|
|
1149
|
-
isFixedExpand:
|
|
1150
|
-
containerWidth:
|
|
1151
|
-
colSpan:
|
|
1152
|
-
},
|
|
1231
|
+
default: () => [s(we, {
|
|
1232
|
+
isFixedExpand: te.value || le.value,
|
|
1233
|
+
containerWidth: u == null ? void 0 : u.clientWidth,
|
|
1234
|
+
colSpan: m.value.length + b.value.length
|
|
1235
|
+
}, tn(r) ? r : {
|
|
1153
1236
|
default: () => [r]
|
|
1154
1237
|
})]
|
|
1155
1238
|
});
|
|
1156
1239
|
}
|
|
1157
1240
|
return null;
|
|
1158
|
-
},
|
|
1241
|
+
}, Oe = (e, t, {
|
|
1159
1242
|
indentSize: a = 0,
|
|
1160
1243
|
indexPath: n,
|
|
1161
|
-
allowDrag: r = !0
|
|
1244
|
+
allowDrag: r = !0,
|
|
1245
|
+
renderChildren: i = !0
|
|
1162
1246
|
} = {}) => {
|
|
1163
|
-
var
|
|
1164
|
-
const o = e.key,
|
|
1247
|
+
var y;
|
|
1248
|
+
const o = e.key, u = !n && l.pagination && E.value.length > k.value ? (D.value - 1) * k.value : 0, f = (n ?? []).concat(t + u), x = We(e), R = ce.value.includes(o), K = S.sourceKey === e.key, P = Array.from({
|
|
1249
|
+
length: b.value.length + m.value.length
|
|
1250
|
+
}, (c, w) => w).find((c) => !ye.value.includes(`${t}-${l.spanAll ? c : c - b.value.length}-${e.key}`) && (c >= b.value.length || !l.spanAll || !ye.value.includes(`${t}-${c}-${e.key}`))) ?? 0, z = T.value ? {
|
|
1165
1251
|
draggable: r,
|
|
1166
|
-
onDragstart: (
|
|
1167
|
-
r &&
|
|
1252
|
+
onDragstart: (c) => {
|
|
1253
|
+
r && jl(c, e.key, f, e.raw);
|
|
1168
1254
|
},
|
|
1169
|
-
onDragend: (
|
|
1170
|
-
r &&
|
|
1255
|
+
onDragend: (c) => {
|
|
1256
|
+
r && Vl(c);
|
|
1171
1257
|
}
|
|
1172
|
-
} : {},
|
|
1173
|
-
onDragenter: (
|
|
1174
|
-
r
|
|
1258
|
+
} : {}, H = T.value ? {
|
|
1259
|
+
onDragenter: (c) => {
|
|
1260
|
+
!r || !S.dragging || Nl(c, f);
|
|
1175
1261
|
},
|
|
1176
|
-
onDragover: (
|
|
1177
|
-
r
|
|
1262
|
+
onDragover: (c) => {
|
|
1263
|
+
!r || !S.dragging || _l(c);
|
|
1178
1264
|
},
|
|
1179
|
-
onDrop: (
|
|
1180
|
-
|
|
1265
|
+
onDrop: (c) => {
|
|
1266
|
+
if (!r) return;
|
|
1267
|
+
const {
|
|
1268
|
+
sourcePath: w,
|
|
1269
|
+
targetPath: B
|
|
1270
|
+
} = S;
|
|
1271
|
+
S.dragging && w.toString() !== B.toString() && w.length === B.length && w.slice(0, -1).toString() === B.slice(0, -1).toString() && O("drag"), ql(c);
|
|
1181
1272
|
}
|
|
1182
1273
|
} : {};
|
|
1183
|
-
return
|
|
1274
|
+
return s(Ve, null, [s(ne, F({
|
|
1184
1275
|
key: o,
|
|
1276
|
+
"data-x-table-row": String(o),
|
|
1277
|
+
tabindex: T.value === "row" && r && !l.keyboardNavigation ? 0 : void 0,
|
|
1278
|
+
"aria-keyshortcuts": T.value === "row" ? "Alt+ArrowUp Alt+ArrowDown" : void 0,
|
|
1279
|
+
onKeydown: T.value === "row" ? (c) => {
|
|
1280
|
+
c.target === c.currentTarget && Ie(c, e, f, r);
|
|
1281
|
+
} : void 0,
|
|
1185
1282
|
class: [{
|
|
1186
|
-
[
|
|
1187
|
-
[
|
|
1188
|
-
},
|
|
1189
|
-
rowIndex:
|
|
1283
|
+
[d.element("tr-draggable")]: T.value === "row",
|
|
1284
|
+
[d.element("tr-drag")]: K
|
|
1285
|
+
}, Q(l.rowClass) ? l.rowClass(e.raw, t) : l.rowClass],
|
|
1286
|
+
rowIndex: t,
|
|
1190
1287
|
record: e,
|
|
1191
|
-
checked:
|
|
1192
|
-
onClick: (
|
|
1193
|
-
onDblclick: (
|
|
1194
|
-
onContextmenu: (
|
|
1195
|
-
},
|
|
1196
|
-
default: () => [
|
|
1197
|
-
const
|
|
1198
|
-
if (
|
|
1288
|
+
checked: !!(l.rowSelection && (!ke.value && !El.value && !e.isLeaf ? La(De.value, Aa(e)).checked : (y = Tl.value) != null && y.includes(o))),
|
|
1289
|
+
onClick: (c) => gt(e, c),
|
|
1290
|
+
onDblclick: (c) => ta(e, c),
|
|
1291
|
+
onContextmenu: (c) => la(e, c)
|
|
1292
|
+
}, T.value === "row" ? z : {}, H), {
|
|
1293
|
+
default: () => [b.value.map((c, w) => {
|
|
1294
|
+
const B = `${t}-${w}-${e.key}`, [He, je] = l.spanAll ? Rt.value[B] ?? [1, 1] : [1, 1];
|
|
1295
|
+
if (l.spanAll && ye.value.includes(B))
|
|
1199
1296
|
return null;
|
|
1200
|
-
const
|
|
1201
|
-
return
|
|
1202
|
-
key: `operation-td-${
|
|
1203
|
-
style:
|
|
1204
|
-
operationColumn:
|
|
1205
|
-
operations:
|
|
1297
|
+
const Ne = be(c.name);
|
|
1298
|
+
return s(Vt, F({
|
|
1299
|
+
key: `operation-td-${w}`,
|
|
1300
|
+
style: Ne,
|
|
1301
|
+
operationColumn: c,
|
|
1302
|
+
operations: G.value,
|
|
1206
1303
|
record: e,
|
|
1207
|
-
hasExpand: !!
|
|
1208
|
-
selectedRowKeys:
|
|
1209
|
-
rowSpan:
|
|
1210
|
-
colSpan:
|
|
1211
|
-
renderExpandBtn:
|
|
1212
|
-
},
|
|
1213
|
-
|
|
1304
|
+
hasExpand: !!x,
|
|
1305
|
+
selectedRowKeys: De.value,
|
|
1306
|
+
rowSpan: He,
|
|
1307
|
+
colSpan: je,
|
|
1308
|
+
renderExpandBtn: Et
|
|
1309
|
+
}, Kt(o, w, P), {
|
|
1310
|
+
onKeydown: (xe) => {
|
|
1311
|
+
Dt(o, w, xe), (c.name === "drag-handle" || T.value === "row") && Ie(xe, e, f, r);
|
|
1312
|
+
}
|
|
1313
|
+
}, T.value === "handle" && c.name === "drag-handle" ? da(e, f, r) : {}, T.value === "handle" && c.name === "drag-handle" ? z : {}), {
|
|
1314
|
+
"drag-handle-icon": h["drag-handle-icon"]
|
|
1214
1315
|
});
|
|
1215
|
-
}),
|
|
1216
|
-
const
|
|
1217
|
-
if (
|
|
1316
|
+
}), m.value.map((c, w) => {
|
|
1317
|
+
const B = `${t}-${l.spanAll ? b.value.length + w : w}-${e.key}`, [He, je] = Rt.value[B] ?? [1, 1];
|
|
1318
|
+
if (ye.value.includes(B))
|
|
1218
1319
|
return null;
|
|
1219
|
-
const
|
|
1320
|
+
const Ne = w === 0 ? {
|
|
1220
1321
|
showExpandBtn: e.hasSubtree,
|
|
1221
1322
|
indentSize: e.hasSubtree ? a - 20 : a
|
|
1222
|
-
} : {},
|
|
1223
|
-
return
|
|
1224
|
-
key: `td-${
|
|
1225
|
-
style:
|
|
1226
|
-
rowIndex:
|
|
1323
|
+
} : {}, xe = be(c.dataIndex);
|
|
1324
|
+
return s(we, F({
|
|
1325
|
+
key: `td-${w}`,
|
|
1326
|
+
style: xe,
|
|
1327
|
+
rowIndex: t,
|
|
1227
1328
|
record: e,
|
|
1228
|
-
column:
|
|
1229
|
-
operations:
|
|
1230
|
-
dataColumns:
|
|
1231
|
-
rowSpan:
|
|
1232
|
-
renderExpandBtn:
|
|
1233
|
-
colSpan:
|
|
1234
|
-
},
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1329
|
+
column: c,
|
|
1330
|
+
operations: G.value,
|
|
1331
|
+
dataColumns: ze.value,
|
|
1332
|
+
rowSpan: He,
|
|
1333
|
+
renderExpandBtn: Et,
|
|
1334
|
+
colSpan: je
|
|
1335
|
+
}, Ne, Kt(o, b.value.length + w, P), {
|
|
1336
|
+
onKeydown: (L) => {
|
|
1337
|
+
Dt(o, b.value.length + w, L), T.value === "row" && L.target === L.currentTarget && Ie(L, e, f, r);
|
|
1338
|
+
},
|
|
1339
|
+
onClick: (L) => mt(e, c, L),
|
|
1340
|
+
onDblclick: (L) => pt(e, c, L),
|
|
1341
|
+
onMouseenter: (L) => yt(e, c, L),
|
|
1342
|
+
onMouseleave: (L) => bt(e, c, L),
|
|
1343
|
+
onContextmenu: (L) => xt(e, c, L)
|
|
1240
1344
|
}), {
|
|
1241
|
-
td:
|
|
1345
|
+
td: h.td
|
|
1242
1346
|
});
|
|
1243
1347
|
})],
|
|
1244
|
-
tr:
|
|
1245
|
-
}),
|
|
1246
|
-
indentSize: a +
|
|
1247
|
-
indexPath:
|
|
1248
|
-
allowDrag: r && !
|
|
1249
|
-
expandContent:
|
|
1348
|
+
tr: h.tr
|
|
1349
|
+
}), i && R && Tt(e, {
|
|
1350
|
+
indentSize: a + l.indentSize,
|
|
1351
|
+
indexPath: f,
|
|
1352
|
+
allowDrag: r && !K,
|
|
1353
|
+
expandContent: x
|
|
1250
1354
|
})]);
|
|
1251
|
-
},
|
|
1252
|
-
const e =
|
|
1253
|
-
|
|
1254
|
-
|
|
1355
|
+
}, pe = g(() => {
|
|
1356
|
+
const e = [], t = (n, r = 0, i, o = !0) => {
|
|
1357
|
+
n.forEach((u, f) => {
|
|
1358
|
+
var K, P;
|
|
1359
|
+
if (e.push({
|
|
1360
|
+
key: `row:${u.key}`,
|
|
1361
|
+
record: u,
|
|
1362
|
+
rowIndex: f,
|
|
1363
|
+
indentSize: r,
|
|
1364
|
+
indexPath: i,
|
|
1365
|
+
allowDrag: o
|
|
1366
|
+
}), !ce.value.includes(u.key)) return;
|
|
1367
|
+
const x = !i && l.pagination && E.value.length > k.value ? (D.value - 1) * k.value : 0, R = (i ?? []).concat(f + x);
|
|
1368
|
+
u.hasSubtree && ((K = u.children) != null && K.length) ? t(u.children, r + l.indentSize, R, o && S.sourceKey !== u.key) : (u.hasSubtree && ((P = u.children) == null ? void 0 : P.length) === 0 && Qe.value || We(u)) && e.push({
|
|
1369
|
+
key: `expand:${u.key}`,
|
|
1370
|
+
record: u,
|
|
1371
|
+
rowIndex: f,
|
|
1372
|
+
indentSize: r,
|
|
1373
|
+
indexPath: R,
|
|
1374
|
+
allowDrag: !1,
|
|
1375
|
+
detail: !0
|
|
1376
|
+
});
|
|
1377
|
+
});
|
|
1378
|
+
}, a = p.value.some((n) => n.hasSubtree);
|
|
1379
|
+
return t(p.value, a ? 20 : 0), e;
|
|
1380
|
+
}), {
|
|
1381
|
+
getCellProps: Kt,
|
|
1382
|
+
handleCellKeydown: Dt
|
|
1383
|
+
} = Ya({
|
|
1384
|
+
enabled: Ht(l, "keyboardNavigation"),
|
|
1385
|
+
rows: pe,
|
|
1386
|
+
root: _,
|
|
1387
|
+
mountedKeys: g(() => {
|
|
1388
|
+
var t;
|
|
1389
|
+
if (!U.value) return;
|
|
1390
|
+
const e = (t = ie.value) == null ? void 0 : t.currentList;
|
|
1391
|
+
return e == null ? void 0 : e.filter((a) => !a.detail).map((a) => a.record.key);
|
|
1392
|
+
}),
|
|
1393
|
+
scrollToRow: (e) => {
|
|
1394
|
+
var t;
|
|
1395
|
+
U.value && ((t = ie.value) == null || t.scrollTo({
|
|
1396
|
+
index: e
|
|
1397
|
+
}));
|
|
1398
|
+
}
|
|
1399
|
+
}), Bt = async (e) => {
|
|
1400
|
+
var a, n;
|
|
1401
|
+
await jt();
|
|
1402
|
+
const t = Array.from(((a = _.value) == null ? void 0 : a.querySelectorAll("[data-x-table-row]")) ?? []).find((r) => r.dataset.xTableRow === String(e));
|
|
1403
|
+
(n = (t == null ? void 0 : t.querySelector(".x-table--drag-button")) ?? (t == null ? void 0 : t.querySelector('[tabindex="0"]')) ?? t) == null || n.focus();
|
|
1404
|
+
}, Ie = (e, t, a, n) => {
|
|
1405
|
+
var u;
|
|
1406
|
+
if (!n || !e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || !["ArrowUp", "ArrowDown"].includes(e.key)) return;
|
|
1407
|
+
e.preventDefault(), e.stopPropagation();
|
|
1408
|
+
let r = E.value;
|
|
1409
|
+
for (const f of a.slice(0, -1)) r = ((u = r[f]) == null ? void 0 : u.children) ?? [];
|
|
1410
|
+
const o = a[a.length - 1] + (e.key === "ArrowDown" ? 1 : -1);
|
|
1411
|
+
if (r[o] && !(a.length === 1 && l.pagination && E.value.length > k.value && Math.floor(o / k.value) !== D.value - 1)) {
|
|
1412
|
+
it(t.key, a, t.raw), S.targetPath = [...a.slice(0, -1), o];
|
|
1413
|
+
try {
|
|
1414
|
+
O("drag");
|
|
1415
|
+
} finally {
|
|
1416
|
+
ut();
|
|
1417
|
+
}
|
|
1418
|
+
Bt(t.key);
|
|
1419
|
+
}
|
|
1420
|
+
};
|
|
1421
|
+
let C;
|
|
1422
|
+
const $t = (e) => {
|
|
1423
|
+
if (!C || C.id !== e.pointerId || !S.dragging && Math.abs(e.clientY - C.y) < 6) return;
|
|
1424
|
+
e.preventDefault(), S.dragging || it(C.record.key, C.path, C.record.raw);
|
|
1425
|
+
const t = C.targets.find((a) => e.clientY >= a.top && e.clientY <= a.bottom);
|
|
1426
|
+
t && t.path.slice(0, -1).toString() === C.path.slice(0, -1).toString() && (S.targetPath = t.path);
|
|
1427
|
+
}, M = () => {
|
|
1428
|
+
var t, a;
|
|
1429
|
+
const e = C;
|
|
1430
|
+
C = void 0, e && (e.element.removeEventListener("pointermove", $t), e.element.removeEventListener("pointerup", Mt), e.element.removeEventListener("pointercancel", M), e.element.removeEventListener("lostpointercapture", M), (a = (t = e.element).hasPointerCapture) != null && a.call(t, e.id) && e.element.releasePointerCapture(e.id)), ut();
|
|
1431
|
+
}, Mt = (e) => {
|
|
1432
|
+
if (!C || C.id !== e.pointerId) return;
|
|
1433
|
+
const t = C.record.key, a = S.dragging && S.sourcePath.toString() !== S.targetPath.toString();
|
|
1434
|
+
try {
|
|
1435
|
+
a && O("drag");
|
|
1436
|
+
} finally {
|
|
1437
|
+
M();
|
|
1438
|
+
}
|
|
1439
|
+
a && (e.preventDefault(), Bt(t));
|
|
1440
|
+
};
|
|
1441
|
+
It(M), J([() => l.data, Je], () => {
|
|
1442
|
+
C && M();
|
|
1443
|
+
});
|
|
1444
|
+
const da = (e, t, a) => ({
|
|
1445
|
+
onPointerdown: (n) => {
|
|
1446
|
+
var o;
|
|
1447
|
+
if (!a || n.pointerType !== "touch" || !n.isPrimary) return;
|
|
1448
|
+
const r = _.value;
|
|
1449
|
+
if (!r) return;
|
|
1450
|
+
M();
|
|
1451
|
+
const i = Array.from(r.querySelectorAll("[data-x-table-row]"));
|
|
1452
|
+
C = {
|
|
1453
|
+
id: n.pointerId,
|
|
1454
|
+
y: n.clientY,
|
|
1455
|
+
element: r,
|
|
1456
|
+
record: e,
|
|
1457
|
+
path: t,
|
|
1458
|
+
targets: pe.value.filter((u) => !u.detail).flatMap((u) => {
|
|
1459
|
+
const f = i.find((R) => R.dataset.xTableRow === String(u.record.key));
|
|
1460
|
+
if (!f) return [];
|
|
1461
|
+
const x = f.getBoundingClientRect();
|
|
1462
|
+
return [{
|
|
1463
|
+
top: x.top,
|
|
1464
|
+
bottom: x.bottom,
|
|
1465
|
+
path: (u.indexPath ?? []).concat(u.rowIndex + (!u.indexPath && l.pagination && E.value.length > k.value ? (D.value - 1) * k.value : 0))
|
|
1466
|
+
}];
|
|
1467
|
+
})
|
|
1468
|
+
}, r.addEventListener("pointermove", $t), r.addEventListener("pointerup", Mt), r.addEventListener("pointercancel", M), r.addEventListener("lostpointercapture", M), (o = r.setPointerCapture) == null || o.call(r, n.pointerId);
|
|
1469
|
+
}
|
|
1470
|
+
}), zt = () => {
|
|
1471
|
+
const e = p.value.some((t) => !!t.hasSubtree);
|
|
1472
|
+
return s(Wa, null, {
|
|
1473
|
+
default: () => [p.value.length > 0 ? p.value.map((t, a) => Oe(t, a, {
|
|
1255
1474
|
indentSize: e ? 20 : 0
|
|
1256
|
-
})) :
|
|
1257
|
-
tbody:
|
|
1475
|
+
})) : Ct()],
|
|
1476
|
+
tbody: h.tbody
|
|
1258
1477
|
});
|
|
1259
|
-
},
|
|
1260
|
-
default: () => [
|
|
1261
|
-
key: `header-row-${
|
|
1478
|
+
}, Ft = () => s(Fa, null, {
|
|
1479
|
+
default: () => [Ae.value.map((e, t) => s(ne, {
|
|
1480
|
+
key: `header-row-${t}`
|
|
1262
1481
|
}, {
|
|
1263
|
-
default: () => [
|
|
1482
|
+
default: () => [t === 0 && b.value.map((a, n) => {
|
|
1264
1483
|
var r;
|
|
1265
|
-
return
|
|
1484
|
+
return s(Ia, {
|
|
1266
1485
|
key: `operation-th-${n}`,
|
|
1267
|
-
ref: (
|
|
1268
|
-
|
|
1486
|
+
ref: (i) => {
|
|
1487
|
+
i && "$el" in i && a.name && (Z.value[a.name] = i.$el);
|
|
1269
1488
|
},
|
|
1270
1489
|
operationColumn: a,
|
|
1271
|
-
operations:
|
|
1272
|
-
selectAll: !!(a.name === "selection-checkbox" && ((r =
|
|
1273
|
-
rowSpan:
|
|
1490
|
+
operations: G.value,
|
|
1491
|
+
selectAll: !!(a.name === "selection-checkbox" && ((r = l.rowSelection) != null && r.showCheckedAll)),
|
|
1492
|
+
rowSpan: Ae.value.length
|
|
1274
1493
|
}, null);
|
|
1275
1494
|
}), e.map((a, n) => {
|
|
1276
|
-
|
|
1277
|
-
|
|
1495
|
+
var i, o;
|
|
1496
|
+
const r = l.columnResizable && !!a.dataIndex && !((i = a.children) != null && i.length) && a.dataIndex !== ((o = m.value[m.value.length - 1]) == null ? void 0 : o.dataIndex);
|
|
1497
|
+
return s(Oa, {
|
|
1278
1498
|
key: `th-${n}`,
|
|
1279
|
-
ref: (
|
|
1280
|
-
|
|
1499
|
+
ref: (u) => {
|
|
1500
|
+
u && "$el" in u && a.dataIndex && (Z.value[a.dataIndex] = u.$el);
|
|
1281
1501
|
},
|
|
1282
1502
|
column: a,
|
|
1283
|
-
operations:
|
|
1284
|
-
dataColumns:
|
|
1503
|
+
operations: G.value,
|
|
1504
|
+
dataColumns: ze.value,
|
|
1285
1505
|
resizable: r,
|
|
1286
|
-
onClick: (
|
|
1506
|
+
onClick: (u) => aa(a, u)
|
|
1287
1507
|
}, {
|
|
1288
|
-
th:
|
|
1508
|
+
th: h.th
|
|
1289
1509
|
});
|
|
1290
1510
|
})]
|
|
1291
1511
|
}))],
|
|
1292
|
-
thead:
|
|
1293
|
-
}),
|
|
1294
|
-
var e,
|
|
1295
|
-
if (
|
|
1296
|
-
const a =
|
|
1297
|
-
|
|
1512
|
+
thead: h.thead
|
|
1513
|
+
}), ca = () => {
|
|
1514
|
+
var e, t;
|
|
1515
|
+
if (ee.value) {
|
|
1516
|
+
const a = W(l.stickyHeader) ? `${l.stickyHeader}px` : void 0, n = [(e = X.value) == null ? void 0 : e.outerClass];
|
|
1517
|
+
V.value && n.push(d.element("header-sticky"));
|
|
1298
1518
|
const r = {
|
|
1299
1519
|
top: a,
|
|
1300
|
-
...(
|
|
1301
|
-
},
|
|
1302
|
-
return
|
|
1303
|
-
ref:
|
|
1304
|
-
class: [
|
|
1305
|
-
[
|
|
1520
|
+
...(t = X.value) == null ? void 0 : t.outerStyle
|
|
1521
|
+
}, i = oe.value ? Gt : "div";
|
|
1522
|
+
return s(Ve, null, [l.showHeader && s(i, F({
|
|
1523
|
+
ref: hl,
|
|
1524
|
+
class: [d.element("header"), {
|
|
1525
|
+
[d.element("header-sticky")]: V.value && !oe.value
|
|
1306
1526
|
}],
|
|
1307
1527
|
style: {
|
|
1308
|
-
overflowY:
|
|
1309
|
-
top:
|
|
1528
|
+
overflowY: ae.value ? "scroll" : void 0,
|
|
1529
|
+
top: oe.value ? void 0 : a
|
|
1310
1530
|
}
|
|
1311
|
-
},
|
|
1312
|
-
hide:
|
|
1531
|
+
}, re.value ? {
|
|
1532
|
+
hide: p.value.length !== 0,
|
|
1313
1533
|
disableVertical: !0,
|
|
1314
|
-
...
|
|
1534
|
+
...X.value,
|
|
1315
1535
|
outerClass: n,
|
|
1316
1536
|
outerStyle: r
|
|
1317
1537
|
} : void 0), {
|
|
1318
|
-
default: () => [
|
|
1319
|
-
class:
|
|
1320
|
-
style:
|
|
1538
|
+
default: () => [s("table", {
|
|
1539
|
+
class: d.element("element"),
|
|
1540
|
+
style: na.value,
|
|
1321
1541
|
cellpadding: 0,
|
|
1322
1542
|
cellspacing: 0
|
|
1323
|
-
}, [
|
|
1324
|
-
dataColumns:
|
|
1325
|
-
operations:
|
|
1326
|
-
columnWidth:
|
|
1327
|
-
}, null),
|
|
1328
|
-
}),
|
|
1329
|
-
onResize:
|
|
1543
|
+
}, [s(Se, {
|
|
1544
|
+
dataColumns: m.value,
|
|
1545
|
+
operations: b.value,
|
|
1546
|
+
columnWidth: q
|
|
1547
|
+
}, null), Ft()])]
|
|
1548
|
+
}), s(qt, {
|
|
1549
|
+
onResize: ia
|
|
1330
1550
|
}, {
|
|
1331
1551
|
default: () => {
|
|
1332
|
-
var
|
|
1333
|
-
return [
|
|
1334
|
-
ref:
|
|
1335
|
-
class:
|
|
1336
|
-
data:
|
|
1552
|
+
var o, u, f, x, R, K, P, z, H;
|
|
1553
|
+
return [U.value && p.value.length ? s(Ha, F({
|
|
1554
|
+
ref: ie,
|
|
1555
|
+
class: d.element("body"),
|
|
1556
|
+
data: pe.value,
|
|
1337
1557
|
itemKey: "key",
|
|
1338
1558
|
component: {
|
|
1339
1559
|
list: "table",
|
|
1340
1560
|
content: "tbody"
|
|
1341
1561
|
},
|
|
1342
1562
|
listAttrs: {
|
|
1343
|
-
class:
|
|
1344
|
-
style:
|
|
1563
|
+
class: d.element("element"),
|
|
1564
|
+
style: ge.value
|
|
1345
1565
|
},
|
|
1346
1566
|
paddingPosition: "list",
|
|
1347
1567
|
height: "auto"
|
|
1348
|
-
},
|
|
1349
|
-
|
|
1568
|
+
}, Yt(l.virtualListProps ?? {}, ["data", "itemKey", "component"]), {
|
|
1569
|
+
fixedSize: pe.value.some((y) => y.detail || y.record.hasSubtree) ? !1 : (o = l.virtualListProps) == null ? void 0 : o.fixedSize,
|
|
1570
|
+
onScroll: vt
|
|
1350
1571
|
}), {
|
|
1351
1572
|
item: ({
|
|
1352
|
-
item:
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1573
|
+
item: y
|
|
1574
|
+
}) => y.detail ? Tt(y.record, {
|
|
1575
|
+
indentSize: y.indentSize,
|
|
1576
|
+
indexPath: y.indexPath ?? [],
|
|
1577
|
+
allowDrag: !1,
|
|
1578
|
+
expandContent: We(y.record)
|
|
1579
|
+
}) : Oe(y.record, y.rowIndex, {
|
|
1580
|
+
indentSize: y.indentSize,
|
|
1581
|
+
indexPath: y.indexPath,
|
|
1582
|
+
allowDrag: y.allowDrag,
|
|
1583
|
+
renderChildren: !1
|
|
1584
|
+
})
|
|
1585
|
+
}) : s(i, F({
|
|
1586
|
+
ref: ie,
|
|
1587
|
+
class: d.element("body"),
|
|
1358
1588
|
style: {
|
|
1359
|
-
maxHeight: (
|
|
1589
|
+
maxHeight: ((u = l.scroll) == null ? void 0 : u.y) ?? ((f = l.virtualListProps) == null ? void 0 : f.height) ? W(((x = l.scroll) == null ? void 0 : x.y) ?? ((R = l.virtualListProps) == null ? void 0 : R.height)) ? `${((K = l.scroll) == null ? void 0 : K.y) ?? ((P = l.virtualListProps) == null ? void 0 : P.height)}px` : ((z = l.scroll) == null ? void 0 : z.y) ?? ((H = l.virtualListProps) == null ? void 0 : H.height) : "100%"
|
|
1360
1590
|
}
|
|
1361
|
-
},
|
|
1591
|
+
}, re.value ? {
|
|
1362
1592
|
outerStyle: {
|
|
1363
1593
|
display: "flex",
|
|
1364
1594
|
minHeight: "0"
|
|
1365
1595
|
},
|
|
1366
|
-
...
|
|
1596
|
+
...X.value
|
|
1367
1597
|
} : void 0, {
|
|
1368
|
-
onScroll:
|
|
1598
|
+
onScroll: vt
|
|
1369
1599
|
}), {
|
|
1370
|
-
default: () => [
|
|
1371
|
-
class:
|
|
1372
|
-
style:
|
|
1600
|
+
default: () => [s("table", {
|
|
1601
|
+
class: d.element("element"),
|
|
1602
|
+
style: ge.value,
|
|
1373
1603
|
cellpadding: 0,
|
|
1374
1604
|
cellspacing: 0
|
|
1375
|
-
}, [
|
|
1376
|
-
dataColumns:
|
|
1377
|
-
operations:
|
|
1378
|
-
columnWidth:
|
|
1379
|
-
}, null),
|
|
1605
|
+
}, [p.value.length !== 0 && s(Se, {
|
|
1606
|
+
dataColumns: m.value,
|
|
1607
|
+
operations: b.value,
|
|
1608
|
+
columnWidth: q
|
|
1609
|
+
}, null), zt()])]
|
|
1380
1610
|
})];
|
|
1381
1611
|
}
|
|
1382
|
-
}),
|
|
1383
|
-
ref:
|
|
1384
|
-
class:
|
|
1612
|
+
}), $.value && $.value.length > 0 && s("div", {
|
|
1613
|
+
ref: Re,
|
|
1614
|
+
class: d.element("tfoot"),
|
|
1385
1615
|
style: {
|
|
1386
|
-
overflowY:
|
|
1616
|
+
overflowY: ae.value ? "scroll" : "hidden"
|
|
1387
1617
|
}
|
|
1388
|
-
}, [
|
|
1389
|
-
class:
|
|
1390
|
-
style:
|
|
1618
|
+
}, [s("table", {
|
|
1619
|
+
class: d.element("element"),
|
|
1620
|
+
style: ge.value,
|
|
1391
1621
|
cellpadding: 0,
|
|
1392
1622
|
cellspacing: 0
|
|
1393
|
-
}, [
|
|
1394
|
-
dataColumns:
|
|
1395
|
-
operations:
|
|
1396
|
-
columnWidth:
|
|
1397
|
-
}, null),
|
|
1623
|
+
}, [s(Se, {
|
|
1624
|
+
dataColumns: m.value,
|
|
1625
|
+
operations: b.value,
|
|
1626
|
+
columnWidth: q
|
|
1627
|
+
}, null), At()])])]);
|
|
1398
1628
|
}
|
|
1399
|
-
return
|
|
1400
|
-
onResize: () =>
|
|
1629
|
+
return s(qt, {
|
|
1630
|
+
onResize: () => {
|
|
1631
|
+
Me(), me();
|
|
1632
|
+
}
|
|
1401
1633
|
}, {
|
|
1402
|
-
default: () => [
|
|
1403
|
-
class:
|
|
1634
|
+
default: () => [s("table", {
|
|
1635
|
+
class: d.element("element"),
|
|
1404
1636
|
cellpadding: 0,
|
|
1405
1637
|
cellspacing: 0,
|
|
1406
|
-
style:
|
|
1407
|
-
}, [
|
|
1408
|
-
dataColumns:
|
|
1409
|
-
operations:
|
|
1410
|
-
columnWidth:
|
|
1411
|
-
}, null),
|
|
1638
|
+
style: ge.value
|
|
1639
|
+
}, [s(Se, {
|
|
1640
|
+
dataColumns: m.value,
|
|
1641
|
+
operations: b.value,
|
|
1642
|
+
columnWidth: q
|
|
1643
|
+
}, null), l.showHeader && Ft(), zt(), $.value && $.value.length > 0 && At()])]
|
|
1412
1644
|
});
|
|
1413
|
-
},
|
|
1645
|
+
}, Wt = (e) => {
|
|
1414
1646
|
var n;
|
|
1415
|
-
const
|
|
1416
|
-
maxHeight:
|
|
1417
|
-
} : void 0, a =
|
|
1418
|
-
return
|
|
1419
|
-
class: [
|
|
1420
|
-
}, [
|
|
1421
|
-
ref:
|
|
1422
|
-
class: [
|
|
1423
|
-
[
|
|
1647
|
+
const t = (n = l.scroll) != null && n.maxHeight ? {
|
|
1648
|
+
maxHeight: W(l.scroll.maxHeight) ? `${l.scroll.maxHeight}px` : l.scroll.maxHeight
|
|
1649
|
+
} : void 0, a = oe.value && !V.value ? Gt : "div";
|
|
1650
|
+
return s(Ve, null, [s("div", {
|
|
1651
|
+
class: [d.element("container"), oa.value]
|
|
1652
|
+
}, [s(a, F({
|
|
1653
|
+
ref: cl,
|
|
1654
|
+
class: [d.element("content"), {
|
|
1655
|
+
[d.element("content-scroll-x")]: !ee.value
|
|
1424
1656
|
}],
|
|
1425
|
-
style:
|
|
1426
|
-
},
|
|
1657
|
+
style: t
|
|
1658
|
+
}, re.value && !V.value ? {
|
|
1427
1659
|
outerStyle: {
|
|
1428
1660
|
height: "100%"
|
|
1429
1661
|
},
|
|
1430
|
-
...
|
|
1662
|
+
...X.value
|
|
1431
1663
|
} : void 0, {
|
|
1432
|
-
onScroll:
|
|
1664
|
+
onScroll: ht
|
|
1433
1665
|
}), {
|
|
1434
|
-
default: () => [e ?
|
|
1435
|
-
class:
|
|
1666
|
+
default: () => [e ? s("table", {
|
|
1667
|
+
class: d.element("element"),
|
|
1436
1668
|
cellpadding: 0,
|
|
1437
1669
|
cellspacing: 0
|
|
1438
|
-
}, [e()]) :
|
|
1439
|
-
})]),
|
|
1440
|
-
class:
|
|
1441
|
-
}, [
|
|
1442
|
-
},
|
|
1443
|
-
var
|
|
1444
|
-
const e =
|
|
1445
|
-
return
|
|
1446
|
-
class:
|
|
1447
|
-
}, [(
|
|
1448
|
-
total:
|
|
1449
|
-
current:
|
|
1450
|
-
pageSize:
|
|
1670
|
+
}, [e()]) : ca()]
|
|
1671
|
+
})]), h.footer && s("div", {
|
|
1672
|
+
class: d.element("footer")
|
|
1673
|
+
}, [h.footer()])]);
|
|
1674
|
+
}, Ot = () => {
|
|
1675
|
+
var t, a;
|
|
1676
|
+
const e = qe(l.pagination) ? Yt(l.pagination, ["current", "pageSize", "defaultCurrent", "defaultPageSize"]) : {};
|
|
1677
|
+
return s("div", {
|
|
1678
|
+
class: ra.value
|
|
1679
|
+
}, [(t = h["pagination-left"]) == null ? void 0 : t.call(h), s(Ma, F({
|
|
1680
|
+
total: dt.value.length,
|
|
1681
|
+
current: D.value,
|
|
1682
|
+
pageSize: k.value,
|
|
1451
1683
|
onChange: (n) => {
|
|
1452
|
-
|
|
1684
|
+
Yl(n), O("pagination");
|
|
1453
1685
|
},
|
|
1454
1686
|
onPageSizeChange: (n) => {
|
|
1455
|
-
|
|
1687
|
+
Ul(n), $e(), O("pagination");
|
|
1456
1688
|
}
|
|
1457
|
-
}, e), null), (a =
|
|
1458
|
-
},
|
|
1459
|
-
var e,
|
|
1460
|
-
if (
|
|
1689
|
+
}, e), null), (a = h["pagination-right"]) == null ? void 0 : a.call(h)]);
|
|
1690
|
+
}, fa = g(() => {
|
|
1691
|
+
var e, t;
|
|
1692
|
+
if (xa((e = l.scroll) == null ? void 0 : e.y) && U.value)
|
|
1461
1693
|
return {
|
|
1462
|
-
height: (
|
|
1694
|
+
height: (t = l.scroll) == null ? void 0 : t.y
|
|
1463
1695
|
};
|
|
1464
1696
|
});
|
|
1465
1697
|
return {
|
|
1466
1698
|
render: () => {
|
|
1467
1699
|
var a, n;
|
|
1468
|
-
const e = ((a =
|
|
1469
|
-
return
|
|
1470
|
-
class:
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1700
|
+
const e = ((a = h.default) == null ? void 0 : a.call(h)) ?? [], t = e && Pa(e).length > 0;
|
|
1701
|
+
return h.default && !t ? s("div", {
|
|
1702
|
+
class: St.value,
|
|
1703
|
+
"aria-busy": !!Fe.value.loading
|
|
1704
|
+
}, [Wt(() => e)]) : (Xe.value = ((n = h.columns) == null ? void 0 : n.call(h)) ?? e, s("div", {
|
|
1705
|
+
class: St.value,
|
|
1706
|
+
style: fa.value,
|
|
1707
|
+
"aria-busy": !!Fe.value.loading
|
|
1708
|
+
}, [Xe.value, s($a, Fe.value, {
|
|
1709
|
+
default: () => [l.pagination !== !1 && (p.value.length > 0 || E.value.length > 0) && Ee.value && Ot(), Wt(), l.pagination !== !1 && (p.value.length > 0 || E.value.length > 0) && !Ee.value && Ot()]
|
|
1476
1710
|
})]));
|
|
1477
1711
|
},
|
|
1478
|
-
selfExpand:
|
|
1479
|
-
selfExpandAll:
|
|
1480
|
-
selfSelect:
|
|
1481
|
-
selfSelectAll:
|
|
1482
|
-
selfResetFilters:
|
|
1483
|
-
selfClearFilters:
|
|
1484
|
-
selfResetSorters:
|
|
1485
|
-
selfClearSorters:
|
|
1712
|
+
selfExpand: Wl,
|
|
1713
|
+
selfExpandAll: Ol,
|
|
1714
|
+
selfSelect: $l,
|
|
1715
|
+
selfSelectAll: Ml,
|
|
1716
|
+
selfResetFilters: wl,
|
|
1717
|
+
selfClearFilters: Cl,
|
|
1718
|
+
selfResetSorters: Rl,
|
|
1719
|
+
selfClearSorters: Pl
|
|
1486
1720
|
};
|
|
1487
1721
|
},
|
|
1488
1722
|
methods: {
|
|
@@ -1493,8 +1727,8 @@ const bt = {
|
|
|
1493
1727
|
* @public
|
|
1494
1728
|
* @version 2.22.0
|
|
1495
1729
|
*/
|
|
1496
|
-
selectAll(
|
|
1497
|
-
return this.selfSelectAll(
|
|
1730
|
+
selectAll(l) {
|
|
1731
|
+
return this.selfSelectAll(l);
|
|
1498
1732
|
},
|
|
1499
1733
|
/**
|
|
1500
1734
|
* @zh 设置行选择器状态
|
|
@@ -1504,8 +1738,8 @@ const bt = {
|
|
|
1504
1738
|
* @public
|
|
1505
1739
|
* @version 2.31.0
|
|
1506
1740
|
*/
|
|
1507
|
-
select(
|
|
1508
|
-
return this.selfSelect(
|
|
1741
|
+
select(l, v) {
|
|
1742
|
+
return this.selfSelect(l, v);
|
|
1509
1743
|
},
|
|
1510
1744
|
/**
|
|
1511
1745
|
* @zh 设置全部展开状态
|
|
@@ -1514,8 +1748,8 @@ const bt = {
|
|
|
1514
1748
|
* @public
|
|
1515
1749
|
* @version 2.31.0
|
|
1516
1750
|
*/
|
|
1517
|
-
expandAll(
|
|
1518
|
-
return this.selfExpandAll(
|
|
1751
|
+
expandAll(l) {
|
|
1752
|
+
return this.selfExpandAll(l);
|
|
1519
1753
|
},
|
|
1520
1754
|
/**
|
|
1521
1755
|
* @zh 设置展开状态
|
|
@@ -1525,8 +1759,8 @@ const bt = {
|
|
|
1525
1759
|
* @public
|
|
1526
1760
|
* @version 2.31.0
|
|
1527
1761
|
*/
|
|
1528
|
-
expand(
|
|
1529
|
-
return this.selfExpand(
|
|
1762
|
+
expand(l, v) {
|
|
1763
|
+
return this.selfExpand(l, v);
|
|
1530
1764
|
},
|
|
1531
1765
|
/**
|
|
1532
1766
|
* @zh 重置列的筛选器
|
|
@@ -1535,8 +1769,8 @@ const bt = {
|
|
|
1535
1769
|
* @public
|
|
1536
1770
|
* @version 2.31.0
|
|
1537
1771
|
*/
|
|
1538
|
-
resetFilters(
|
|
1539
|
-
return this.selfResetFilters(
|
|
1772
|
+
resetFilters(l) {
|
|
1773
|
+
return this.selfResetFilters(l);
|
|
1540
1774
|
},
|
|
1541
1775
|
/**
|
|
1542
1776
|
* @zh 清空列的筛选器
|
|
@@ -1545,8 +1779,8 @@ const bt = {
|
|
|
1545
1779
|
* @public
|
|
1546
1780
|
* @version 2.31.0
|
|
1547
1781
|
*/
|
|
1548
|
-
clearFilters(
|
|
1549
|
-
return this.selfClearFilters(
|
|
1782
|
+
clearFilters(l) {
|
|
1783
|
+
return this.selfClearFilters(l);
|
|
1550
1784
|
},
|
|
1551
1785
|
/**
|
|
1552
1786
|
* @zh 重置列的排序
|
|
@@ -1572,5 +1806,5 @@ const bt = {
|
|
|
1572
1806
|
}
|
|
1573
1807
|
});
|
|
1574
1808
|
export {
|
|
1575
|
-
|
|
1809
|
+
qn as default
|
|
1576
1810
|
};
|