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.
Files changed (126) hide show
  1. package/dist/all.esm.js +5715 -3783
  2. package/es/components.d.ts +1 -0
  3. package/es/components.js +2 -7
  4. package/es/grid/src/emits.js +1 -15
  5. package/es/grid/src/grid.js +397 -120
  6. package/es/index.esm.js +1 -0
  7. package/es/index.js +1 -0
  8. package/es/table/module/custom/hook.js +49 -42
  9. package/es/table/module/custom/panel.js +777 -527
  10. package/es/table/module/edit/hook.js +140 -62
  11. package/es/table/module/export/export-panel.js +399 -316
  12. package/es/table/module/export/hook.js +395 -337
  13. package/es/table/module/export/import-panel.js +152 -123
  14. package/es/table/module/filter/hook.js +16 -2
  15. package/es/table/module/filter/panel.js +146 -84
  16. package/es/table/module/keyboard/hook.js +8 -4
  17. package/es/table/module/menu/panel.js +197 -126
  18. package/es/table/render/index.js +151 -98
  19. package/es/table/src/body.js +355 -233
  20. package/es/table/src/cell.js +426 -269
  21. package/es/table/src/columnInfo.js +1 -0
  22. package/es/table/src/footer.js +144 -99
  23. package/es/table/src/group.js +7 -3
  24. package/es/table/src/header.js +229 -172
  25. package/es/table/src/table.js +1503 -1030
  26. package/es/table/src/util.js +15 -19
  27. package/es/toolbar/src/toolbar.js +132 -75
  28. package/es/ui/index.js +1 -1
  29. package/es/ui/src/dom.js +9 -6
  30. package/es/ui/src/log.js +1 -1
  31. package/es/ui/src/utils.d.ts +1 -1
  32. package/lib/components.js +2 -7
  33. package/lib/grid/src/emits.js +1 -15
  34. package/lib/grid/src/grid.js +397 -120
  35. package/lib/index.common.js +1 -0
  36. package/lib/index.js +1 -0
  37. package/lib/index.umd.js +5732 -3800
  38. package/lib/index.umd.min.js +3 -3
  39. package/lib/table/module/custom/hook.js +49 -42
  40. package/lib/table/module/custom/panel.js +777 -527
  41. package/lib/table/module/edit/hook.js +140 -62
  42. package/lib/table/module/export/export-panel.js +399 -316
  43. package/lib/table/module/export/hook.js +395 -337
  44. package/lib/table/module/export/import-panel.js +152 -123
  45. package/lib/table/module/filter/hook.js +16 -2
  46. package/lib/table/module/filter/panel.js +146 -84
  47. package/lib/table/module/keyboard/hook.js +8 -4
  48. package/lib/table/module/menu/panel.js +197 -126
  49. package/lib/table/render/index.js +151 -98
  50. package/lib/table/src/body.js +355 -233
  51. package/lib/table/src/cell.js +426 -269
  52. package/lib/table/src/columnInfo.js +1 -0
  53. package/lib/table/src/footer.js +144 -99
  54. package/lib/table/src/group.js +7 -3
  55. package/lib/table/src/header.js +229 -172
  56. package/lib/table/src/table.js +1471 -1029
  57. package/lib/table/src/util.js +15 -19
  58. package/lib/toolbar/src/toolbar.js +132 -75
  59. package/lib/ui/index.js +1 -1
  60. package/lib/ui/src/dom.js +9 -6
  61. package/lib/ui/src/log.js +1 -1
  62. package/package.json +2 -2
  63. package/packages/colgroup/index.ts +22 -22
  64. package/packages/column/index.ts +22 -22
  65. package/packages/components.ts +41 -44
  66. package/packages/grid/index.ts +18 -18
  67. package/packages/grid/src/emits.ts +5 -19
  68. package/packages/grid/src/grid.ts +2229 -1925
  69. package/packages/grid/src/props.ts +22 -23
  70. package/packages/index.ts +11 -11
  71. package/packages/locale/lang/fr-FR.ts +15 -15
  72. package/packages/locale/lang/it-IT.ts +4 -4
  73. package/packages/locale/lang/uk-UA.ts +1 -1
  74. package/packages/locale/lang/uz-UZ.ts +13 -13
  75. package/packages/locale/lang/zh-CN.ts +907 -907
  76. package/packages/table/index.ts +26 -26
  77. package/packages/table/module/custom/hook.ts +510 -503
  78. package/packages/table/module/custom/panel.ts +2002 -1743
  79. package/packages/table/module/edit/hook.ts +1224 -1131
  80. package/packages/table/module/export/export-panel.ts +697 -611
  81. package/packages/table/module/export/hook.ts +2160 -2059
  82. package/packages/table/module/export/import-panel.ts +319 -279
  83. package/packages/table/module/export/util.ts +25 -24
  84. package/packages/table/module/filter/hook.ts +519 -501
  85. package/packages/table/module/filter/panel.ts +368 -304
  86. package/packages/table/module/keyboard/hook.ts +498 -494
  87. package/packages/table/module/menu/hook.ts +330 -330
  88. package/packages/table/module/menu/panel.ts +272 -201
  89. package/packages/table/module/validator/hook.ts +653 -635
  90. package/packages/table/render/index.ts +1819 -1744
  91. package/packages/table/src/body.ts +1078 -955
  92. package/packages/table/src/cell.ts +1524 -1359
  93. package/packages/table/src/column.ts +192 -192
  94. package/packages/table/src/columnInfo.ts +232 -232
  95. package/packages/table/src/emits.ts +134 -134
  96. package/packages/table/src/footer.ts +425 -380
  97. package/packages/table/src/group.ts +67 -63
  98. package/packages/table/src/header.ts +642 -581
  99. package/packages/table/src/props.ts +336 -336
  100. package/packages/table/src/store.ts +14 -14
  101. package/packages/table/src/table.ts +16011 -15454
  102. package/packages/table/src/use/cell-view.ts +41 -44
  103. package/packages/table/src/use/index.ts +1 -1
  104. package/packages/table/src/util.ts +1206 -1216
  105. package/packages/toolbar/index.ts +18 -18
  106. package/packages/toolbar/src/toolbar.ts +768 -706
  107. package/packages/ui/index.ts +519 -520
  108. package/packages/ui/src/anime.ts +51 -52
  109. package/packages/ui/src/comp.ts +3 -3
  110. package/packages/ui/src/dom.ts +466 -463
  111. package/packages/ui/src/log.ts +19 -19
  112. package/packages/ui/src/utils.ts +66 -66
  113. package/packages/ui/src/vn.ts +55 -55
  114. package/packages/v-x-e-table/index.d.ts +3 -3
  115. package/packages/v-x-e-table/index.ts +3 -3
  116. package/types/all.d.ts +76 -76
  117. package/types/index.d.ts +4 -4
  118. /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  119. /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  120. /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  121. /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  122. /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  123. /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
  124. /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
  125. /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
  126. /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
@@ -44,19 +44,23 @@ function renderTitlePrefixIcon(params) {
44
44
  const { $table, column } = params;
45
45
  const titlePrefix = column.titlePrefix || column.titleHelp;
46
46
  if (titlePrefix) {
47
- return (0, import_vue.h)("span", {
48
- class: ["vxe-cell-title-prefix-icon", titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ""],
49
- onMouseenter(evnt) {
50
- $table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
47
+ return (0, import_vue.h)(
48
+ "span",
49
+ {
50
+ class: ["vxe-cell-title-prefix-icon", titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ""],
51
+ onMouseenter(evnt) {
52
+ $table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
53
+ },
54
+ onMouseleave(evnt) {
55
+ $table.handleTargetLeaveEvent(evnt);
56
+ }
51
57
  },
52
- onMouseleave(evnt) {
53
- $table.handleTargetLeaveEvent(evnt);
54
- }
55
- }, [
56
- (0, import_vue.h)("i", {
57
- class: titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX
58
- })
59
- ]);
58
+ [
59
+ (0, import_vue.h)("i", {
60
+ class: titlePrefix.icon || getIcon().TABLE_TITLE_PREFIX
61
+ })
62
+ ]
63
+ );
60
64
  }
61
65
  return renderEmptyElement($table);
62
66
  }
@@ -64,19 +68,23 @@ function renderTitleSuffixIcon(params) {
64
68
  const { $table, column } = params;
65
69
  const titleSuffix = column.titleSuffix;
66
70
  if (titleSuffix) {
67
- return (0, import_vue.h)("span", {
68
- class: ["vxe-cell-title-suffix-icon", titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ""],
69
- onMouseenter(evnt) {
70
- $table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
71
+ return (0, import_vue.h)(
72
+ "span",
73
+ {
74
+ class: ["vxe-cell-title-suffix-icon", titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ""],
75
+ onMouseenter(evnt) {
76
+ $table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
77
+ },
78
+ onMouseleave(evnt) {
79
+ $table.handleTargetLeaveEvent(evnt);
80
+ }
71
81
  },
72
- onMouseleave(evnt) {
73
- $table.handleTargetLeaveEvent(evnt);
74
- }
75
- }, [
76
- (0, import_vue.h)("i", {
77
- class: titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX
78
- })
79
- ]);
82
+ [
83
+ (0, import_vue.h)("i", {
84
+ class: titleSuffix.icon || getIcon().TABLE_TITLE_SUFFIX
85
+ })
86
+ ]
87
+ );
80
88
  }
81
89
  return renderEmptyElement($table);
82
90
  }
@@ -102,17 +110,24 @@ function renderCellDragIcon(params) {
102
110
  };
103
111
  ons.onMouseup = $table.handleCellDragMouseupEvent;
104
112
  }
105
- return (0, import_vue.h)("span", {
106
- key: "dg",
107
- class: ["vxe-cell--drag-handle", {
108
- "is--disabled": isDisabled
109
- }],
110
- ...ons
111
- }, rowDragIconSlot ? $table.callSlot(rowDragIconSlot, params) : [
112
- (0, import_vue.h)("i", {
113
- class: icon || (dragConfig ? dragConfig.rowIcon : "") || getIcon().TABLE_DRAG_ROW
114
- })
115
- ]);
113
+ return (0, import_vue.h)(
114
+ "span",
115
+ {
116
+ key: "dg",
117
+ class: [
118
+ "vxe-cell--drag-handle",
119
+ {
120
+ "is--disabled": isDisabled
121
+ }
122
+ ],
123
+ ...ons
124
+ },
125
+ rowDragIconSlot ? $table.callSlot(rowDragIconSlot, params) : [
126
+ (0, import_vue.h)("i", {
127
+ class: icon || (dragConfig ? dragConfig.rowIcon : "") || getIcon().TABLE_DRAG_ROW
128
+ })
129
+ ]
130
+ );
116
131
  }
117
132
  function renderCellBaseVNs(params, content) {
118
133
  const { $table, column, level } = params;
@@ -126,17 +141,13 @@ function renderCellBaseVNs(params, content) {
126
141
  const { showIcon, isPeerDrag, isCrossDrag, visibleMethod } = rowDragOpts;
127
142
  const rVisibleMethod = visibleMethod || (dragConfig ? dragConfig.rowVisibleMethod : null);
128
143
  const vns = [];
129
- if (dragSort && rowOpts.drag && ((showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params)))) {
144
+ if (dragSort && rowOpts.drag && (showIcon || (dragConfig ? dragConfig.showRowIcon : false)) && (!rVisibleMethod || rVisibleMethod(params))) {
130
145
  if (treeConfig) {
131
146
  if (treeOpts.transform && (isPeerDrag || isCrossDrag || !level)) {
132
- vns.push(
133
- renderCellDragIcon(params)
134
- );
147
+ vns.push(renderCellDragIcon(params));
135
148
  }
136
149
  } else {
137
- vns.push(
138
- renderCellDragIcon(params)
139
- );
150
+ vns.push(renderCellDragIcon(params));
140
151
  }
141
152
  }
142
153
  return vns.concat(import_xe_utils.default.isArray(content) ? content : [content]);
@@ -163,28 +174,30 @@ function renderHeaderCellDragIcon(params) {
163
174
  };
164
175
  ons.onMouseup = $table.handleHeaderCellDragMouseupEvent;
165
176
  }
166
- return (0, import_vue.h)("span", {
167
- key: "dg",
168
- class: ["vxe-cell--drag-handle", {
169
- "is--disabled": isDisabled
170
- }],
171
- ...ons
172
- }, columnDragIconSlot ? $table.callSlot(columnDragIconSlot, params) : [
173
- (0, import_vue.h)("i", {
174
- class: icon || getIcon().TABLE_DRAG_COLUMN
175
- })
176
- ]);
177
+ return (0, import_vue.h)(
178
+ "span",
179
+ {
180
+ key: "dg",
181
+ class: [
182
+ "vxe-cell--drag-handle",
183
+ {
184
+ "is--disabled": isDisabled
185
+ }
186
+ ],
187
+ ...ons
188
+ },
189
+ columnDragIconSlot ? $table.callSlot(columnDragIconSlot, params) : [
190
+ (0, import_vue.h)("i", {
191
+ class: icon || getIcon().TABLE_DRAG_COLUMN
192
+ })
193
+ ]
194
+ );
177
195
  }
178
196
  }
179
197
  return renderEmptyElement($table);
180
198
  }
181
199
  function renderHeaderCellBaseVNs(params, content) {
182
- const vns = [
183
- renderTitlePrefixIcon(params),
184
- renderHeaderCellDragIcon(params),
185
- ...import_xe_utils.default.isArray(content) ? content : [content],
186
- renderTitleSuffixIcon(params)
187
- ];
200
+ const vns = [renderTitlePrefixIcon(params), renderHeaderCellDragIcon(params), ...import_xe_utils.default.isArray(content) ? content : [content], renderTitleSuffixIcon(params)];
188
201
  return vns;
189
202
  }
190
203
  function getRenderDefaultColumnTitle(column, content) {
@@ -194,9 +207,13 @@ function getRenderDefaultColumnTitle(column, content) {
194
207
  innerHTML: content
195
208
  });
196
209
  }
197
- return (0, import_vue.h)("span", {
198
- key: "ct"
199
- }, (0, import_vn.getSlotVNs)(content));
210
+ return (0, import_vue.h)(
211
+ "span",
212
+ {
213
+ key: "ct"
214
+ },
215
+ (0, import_vn.getSlotVNs)(content)
216
+ );
200
217
  }
201
218
  function renderTitleContent(params, content) {
202
219
  const { $table, column } = params;
@@ -237,12 +254,14 @@ function renderTitleContent(params, content) {
237
254
  }
238
255
  const titleVN = getRenderDefaultColumnTitle(column, content);
239
256
  return [
240
- (0, import_vue.h)("span", {
241
- class: "vxe-cell--title",
242
- ...ons
243
- }, isRowGroupStatus && column.aggFunc && $table.getPivotTableAggregateRenderColTitles ? $table.getPivotTableAggregateRenderColTitles(column, titleVN) : titleSlot ? $table.callSlot(titleSlot, params) : [
244
- titleVN
245
- ])
257
+ (0, import_vue.h)(
258
+ "span",
259
+ {
260
+ class: "vxe-cell--title",
261
+ ...ons
262
+ },
263
+ isRowGroupStatus && column.aggFunc && $table.getPivotTableAggregateRenderColTitles ? $table.getPivotTableAggregateRenderColTitles(column, titleVN) : titleSlot ? $table.callSlot(titleSlot, params) : [titleVN]
264
+ )
246
265
  ];
247
266
  }
248
267
  function getFooterContent(params) {
@@ -275,9 +294,13 @@ function getFooterContent(params) {
275
294
  }
276
295
  }
277
296
  return [
278
- (0, import_vue.h)("span", {
279
- class: "vxe-cell--label"
280
- }, (0, import_utils.formatText)(itemValue, 1))
297
+ (0, import_vue.h)(
298
+ "span",
299
+ {
300
+ class: "vxe-cell--label"
301
+ },
302
+ (0, import_utils.formatText)(itemValue, 1)
303
+ )
281
304
  ];
282
305
  }
283
306
  function getDefaultCellLabel(params) {
@@ -497,7 +520,7 @@ const Cell = {
497
520
  }
498
521
  if (editRenderOpts) {
499
522
  const editCompConf = editRenderOpts && editRenderOpts.name ? rendererOpts[editRenderOpts.name] || renderer.get(editRenderOpts.name) : null;
500
- const editCellRenderFn = editCompConf ? editCompConf.renderTableCell || editCompConf.renderCell || (editCompConf.renderTableDefault || editCompConf.renderDefault) : null;
523
+ const editCellRenderFn = editCompConf ? editCompConf.renderTableCell || editCompConf.renderCell || editCompConf.renderTableDefault || editCompConf.renderDefault : null;
501
524
  if (editCellRenderFn) {
502
525
  return renderCellBaseVNs(params, (0, import_vn.getSlotVNs)(editCellRenderFn(editRenderOpts, Object.assign({ $type: editRenderOpts ? "edit" : "cell" }, params))));
503
526
  }
@@ -513,9 +536,13 @@ const Cell = {
513
536
  },
514
537
  [
515
538
  // 如果设置占位符
516
- editRenderOpts && (0, import_utils.eqEmptyValue)(cellValue) ? (0, import_vue.h)("span", {
517
- class: "vxe-cell--placeholder"
518
- }, (0, import_utils.formatText)((0, import_utils.getFuncText)(cellPlaceholder), 1)) : (0, import_vue.h)("span", (0, import_utils.formatText)(cellValue, 1))
539
+ editRenderOpts && (0, import_utils.eqEmptyValue)(cellValue) ? (0, import_vue.h)(
540
+ "span",
541
+ {
542
+ class: "vxe-cell--placeholder"
543
+ },
544
+ (0, import_utils.formatText)((0, import_utils.getFuncText)(cellPlaceholder), 1)
545
+ ) : (0, import_vue.h)("span", (0, import_utils.formatText)(cellValue, 1))
519
546
  ]
520
547
  )
521
548
  ]);
@@ -541,28 +568,43 @@ const Cell = {
541
568
  const { mode, padding, indent, showIcon, iconOpen, iconClose } = aggregateOpts;
542
569
  const rowid = (0, import_util.getRowid)($table, row);
543
570
  const isExpand = !!rowGroupExpandedFlag && !!rowGroupExpandedMaps[rowid];
544
- return (0, import_vue.h)("div", {
545
- class: ["vxe-row-group--tree-node", {
546
- "is--expanded": isExpand
547
- }],
548
- style: mode !== "column" && padding && indent ? {
549
- paddingLeft: `${level * indent}px`
550
- } : void 0
551
- }, [
552
- showIcon && row.isAggregate ? (0, import_vue.h)("span", {
553
- class: "vxe-row-group--node-btn",
554
- onClick(evnt) {
555
- $table.triggerRowGroupExpandEvent(evnt, params);
556
- }
557
- }, [
558
- (0, import_vue.h)("i", {
559
- class: isExpand ? iconOpen || getIcon().TABLE_ROW_GROUP_OPEN : iconClose || getIcon().TABLE_ROW_GROUP_CLOSE
560
- })
561
- ]) : renderEmptyElement($table),
562
- (0, import_vue.h)("div", {
563
- class: "vxe-row-group-cell"
564
- }, cellVNodes)
565
- ]);
571
+ return (0, import_vue.h)(
572
+ "div",
573
+ {
574
+ class: [
575
+ "vxe-row-group--tree-node",
576
+ {
577
+ "is--expanded": isExpand
578
+ }
579
+ ],
580
+ style: mode !== "column" && padding && indent ? {
581
+ paddingLeft: `${level * indent}px`
582
+ } : void 0
583
+ },
584
+ [
585
+ showIcon && row.isAggregate ? (0, import_vue.h)(
586
+ "span",
587
+ {
588
+ class: "vxe-row-group--node-btn",
589
+ onClick(evnt) {
590
+ $table.triggerRowGroupExpandEvent(evnt, params);
591
+ }
592
+ },
593
+ [
594
+ (0, import_vue.h)("i", {
595
+ class: isExpand ? iconOpen || getIcon().TABLE_ROW_GROUP_OPEN : iconClose || getIcon().TABLE_ROW_GROUP_CLOSE
596
+ })
597
+ ]
598
+ ) : renderEmptyElement($table),
599
+ (0, import_vue.h)(
600
+ "div",
601
+ {
602
+ class: "vxe-row-group-cell"
603
+ },
604
+ cellVNodes
605
+ )
606
+ ]
607
+ );
566
608
  },
567
609
  /**
568
610
  * 树
@@ -606,28 +648,43 @@ const Cell = {
606
648
  $table.triggerTreeExpandEvent(evnt, params);
607
649
  };
608
650
  }
609
- return (0, import_vue.h)("div", {
610
- class: ["vxe-cell--tree-node", {
611
- "is--active": isActive
612
- }],
613
- style: padding && indent ? {
614
- paddingLeft: `${level * indent}px`
615
- } : void 0
616
- }, [
617
- showIcon && (lazy ? isLazyLoaded ? hasChild : hasChild || hasLazyChilds : hasChild) && (!visibleMethod || visibleMethod(params)) ? [
618
- (0, import_vue.h)("div", {
619
- class: "vxe-cell--tree-btn",
620
- ...ons
621
- }, [
622
- (0, import_vue.h)("i", {
623
- class: isLazyLoading ? iconLoaded || getIcon().TABLE_TREE_LOADED : isActive ? iconOpen || getIcon().TABLE_TREE_OPEN : iconClose || getIcon().TABLE_TREE_CLOSE
624
- })
625
- ])
626
- ] : null,
627
- (0, import_vue.h)("div", {
628
- class: "vxe-tree-cell"
629
- }, cellVNodes)
630
- ]);
651
+ return (0, import_vue.h)(
652
+ "div",
653
+ {
654
+ class: [
655
+ "vxe-cell--tree-node",
656
+ {
657
+ "is--active": isActive
658
+ }
659
+ ],
660
+ style: padding && indent ? {
661
+ paddingLeft: `${level * indent}px`
662
+ } : void 0
663
+ },
664
+ [
665
+ showIcon && (lazy ? isLazyLoaded ? hasChild : hasChild || hasLazyChilds : hasChild) && (!visibleMethod || visibleMethod(params)) ? [
666
+ (0, import_vue.h)(
667
+ "div",
668
+ {
669
+ class: "vxe-cell--tree-btn",
670
+ ...ons
671
+ },
672
+ [
673
+ (0, import_vue.h)("i", {
674
+ class: isLazyLoading ? iconLoaded || getIcon().TABLE_TREE_LOADED : isActive ? iconOpen || getIcon().TABLE_TREE_OPEN : iconClose || getIcon().TABLE_TREE_CLOSE
675
+ })
676
+ ]
677
+ )
678
+ ] : null,
679
+ (0, import_vue.h)(
680
+ "div",
681
+ {
682
+ class: "vxe-tree-cell"
683
+ },
684
+ cellVNodes
685
+ )
686
+ ]
687
+ );
631
688
  },
632
689
  /**
633
690
  * 层级节点。
@@ -678,9 +735,7 @@ const Cell = {
678
735
  }
679
736
  const { seq } = params;
680
737
  const seqMd = seqOpts.seqMethod;
681
- return renderCellBaseVNs(params, [
682
- (0, import_vue.h)("span", `${(0, import_utils.formatText)(seqMd ? seqMd(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)
683
- ]);
738
+ return renderCellBaseVNs(params, [(0, import_vue.h)("span", `${(0, import_utils.formatText)(seqMd ? seqMd(params) : treeConfig ? seq : (seqOpts.startIndex || 0) + seq, 1)}`)]);
684
739
  },
685
740
  renderDeepIndexCell(params) {
686
741
  return Cell.renderDeepNodeBtn(params, Cell.renderSeqCell(params));
@@ -696,19 +751,30 @@ const Cell = {
696
751
  const headerSlot = slots ? slots.header : null;
697
752
  return renderHeaderCellBaseVNs(
698
753
  params,
699
- renderTitleContent(params, headerSlot ? $table.callSlot(headerSlot, params) : [
700
- (0, import_vue.h)("span", {
701
- class: "vxe-radio--label"
702
- }, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
703
- ])
754
+ renderTitleContent(
755
+ params,
756
+ headerSlot ? $table.callSlot(headerSlot, params) : [
757
+ (0, import_vue.h)(
758
+ "span",
759
+ {
760
+ class: "vxe-radio--label"
761
+ },
762
+ titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column)
763
+ )
764
+ ]
765
+ )
704
766
  );
705
767
  }
706
768
  return renderHeaderCellBaseVNs(
707
769
  params,
708
770
  renderTitleContent(params, [
709
- (0, import_vue.h)("span", {
710
- class: "vxe-radio--label"
711
- }, titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column))
771
+ (0, import_vue.h)(
772
+ "span",
773
+ {
774
+ class: "vxe-radio--label"
775
+ },
776
+ titleSlot ? $table.callSlot(titleSlot, params) : $table.getHeaderCellLabel(column)
777
+ )
712
778
  ])
713
779
  );
714
780
  },
@@ -753,19 +819,30 @@ const Cell = {
753
819
  }
754
820
  if (defaultSlot || labelField) {
755
821
  radioVNs.push(
756
- (0, import_vue.h)("span", {
757
- class: "vxe-radio--label"
758
- }, defaultSlot ? $table.callSlot(defaultSlot, radioParams) : import_xe_utils.default.get(row, labelField))
822
+ (0, import_vue.h)(
823
+ "span",
824
+ {
825
+ class: "vxe-radio--label"
826
+ },
827
+ defaultSlot ? $table.callSlot(defaultSlot, radioParams) : import_xe_utils.default.get(row, labelField)
828
+ )
759
829
  );
760
830
  }
761
831
  return renderCellBaseVNs(params, [
762
- (0, import_vue.h)("span", {
763
- class: ["vxe-cell--radio", {
764
- "is--checked": isChecked,
765
- "is--disabled": isDisabled
766
- }],
767
- ...ons
768
- }, radioVNs)
832
+ (0, import_vue.h)(
833
+ "span",
834
+ {
835
+ class: [
836
+ "vxe-cell--radio",
837
+ {
838
+ "is--checked": isChecked,
839
+ "is--disabled": isDisabled
840
+ }
841
+ ],
842
+ ...ons
843
+ },
844
+ radioVNs
845
+ )
769
846
  ]);
770
847
  },
771
848
  renderDeepRadioCell(params) {
@@ -801,32 +878,52 @@ const Cell = {
801
878
  }
802
879
  }
803
880
  if (checkStrictly ? !showHeader : showHeader === false) {
804
- return renderHeaderCellBaseVNs(params, renderTitleContent(checkboxParams, [
805
- (0, import_vue.h)("span", {
806
- class: "vxe-checkbox--label"
807
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)
808
- ]));
881
+ return renderHeaderCellBaseVNs(
882
+ params,
883
+ renderTitleContent(checkboxParams, [
884
+ (0, import_vue.h)(
885
+ "span",
886
+ {
887
+ class: "vxe-checkbox--label"
888
+ },
889
+ titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle
890
+ )
891
+ ])
892
+ );
809
893
  }
810
894
  return renderHeaderCellBaseVNs(
811
895
  params,
812
896
  renderTitleContent(checkboxParams, [
813
- (0, import_vue.h)("span", {
814
- class: ["vxe-cell--checkbox", {
815
- "is--checked": isAllCheckboxSelected,
816
- "is--disabled": isAllCheckboxDisabled,
817
- "is--indeterminate": isAllCheckboxIndeterminate
818
- }],
819
- title: import_xe_utils.default.eqNull(headerTitle) ? getI18n("vxe.table.allTitle") : `${headerTitle || ""}`,
820
- ...ons
821
- }, [
822
- (0, import_vue.h)("span", {
823
- class: ["vxe-checkbox--icon", isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : isAllCheckboxDisabled ? getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
824
- })
825
- ].concat(titleSlot || colTitle ? [
826
- (0, import_vue.h)("span", {
827
- class: "vxe-checkbox--label"
828
- }, titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle)
829
- ] : []))
897
+ (0, import_vue.h)(
898
+ "span",
899
+ {
900
+ class: [
901
+ "vxe-cell--checkbox",
902
+ {
903
+ "is--checked": isAllCheckboxSelected,
904
+ "is--disabled": isAllCheckboxDisabled,
905
+ "is--indeterminate": isAllCheckboxIndeterminate
906
+ }
907
+ ],
908
+ title: import_xe_utils.default.eqNull(headerTitle) ? getI18n("vxe.table.allTitle") : `${headerTitle || ""}`,
909
+ ...ons
910
+ },
911
+ [
912
+ (0, import_vue.h)("span", {
913
+ class: ["vxe-checkbox--icon", isAllCheckboxIndeterminate ? getIcon().TABLE_CHECKBOX_INDETERMINATE : isAllCheckboxSelected ? getIcon().TABLE_CHECKBOX_CHECKED : isAllCheckboxDisabled ? getIcon().TABLE_CHECKBOX_DISABLED_UNCHECKED : getIcon().TABLE_CHECKBOX_UNCHECKED]
914
+ })
915
+ ].concat(
916
+ titleSlot || colTitle ? [
917
+ (0, import_vue.h)(
918
+ "span",
919
+ {
920
+ class: "vxe-checkbox--label"
921
+ },
922
+ titleSlot ? $table.callSlot(titleSlot, checkboxParams) : colTitle
923
+ )
924
+ ] : []
925
+ )
926
+ )
830
927
  ])
831
928
  );
832
929
  },
@@ -886,21 +983,32 @@ const Cell = {
886
983
  }
887
984
  if (defaultSlot || labelField) {
888
985
  checkVNs.push(
889
- (0, import_vue.h)("span", {
890
- class: "vxe-checkbox--label"
891
- }, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : import_xe_utils.default.get(row, labelField))
986
+ (0, import_vue.h)(
987
+ "span",
988
+ {
989
+ class: "vxe-checkbox--label"
990
+ },
991
+ defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : import_xe_utils.default.get(row, labelField)
992
+ )
892
993
  );
893
994
  }
894
995
  return renderCellBaseVNs(params, [
895
- (0, import_vue.h)("span", {
896
- class: ["vxe-cell--checkbox", {
897
- "is--checked": isChecked,
898
- "is--disabled": isDisabled,
899
- "is--indeterminate": indeterminate,
900
- "is--hidden": !isVisible
901
- }],
902
- ...ons
903
- }, checkVNs)
996
+ (0, import_vue.h)(
997
+ "span",
998
+ {
999
+ class: [
1000
+ "vxe-cell--checkbox",
1001
+ {
1002
+ "is--checked": isChecked,
1003
+ "is--disabled": isDisabled,
1004
+ "is--indeterminate": indeterminate,
1005
+ "is--hidden": !isVisible
1006
+ }
1007
+ ],
1008
+ ...ons
1009
+ },
1010
+ checkVNs
1011
+ )
904
1012
  ]);
905
1013
  },
906
1014
  renderDeepSelectionCell(params) {
@@ -962,22 +1070,33 @@ const Cell = {
962
1070
  );
963
1071
  if (defaultSlot || labelField) {
964
1072
  checkVNs.push(
965
- (0, import_vue.h)("span", {
966
- class: "vxe-checkbox--label"
967
- }, defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : import_xe_utils.default.get(row, labelField))
1073
+ (0, import_vue.h)(
1074
+ "span",
1075
+ {
1076
+ class: "vxe-checkbox--label"
1077
+ },
1078
+ defaultSlot ? $table.callSlot(defaultSlot, checkboxParams) : import_xe_utils.default.get(row, labelField)
1079
+ )
968
1080
  );
969
1081
  }
970
1082
  }
971
1083
  return renderCellBaseVNs(params, [
972
- (0, import_vue.h)("span", {
973
- class: ["vxe-cell--checkbox", {
974
- "is--checked": isChecked,
975
- "is--disabled": isDisabled,
976
- "is--indeterminate": indeterminateField && !isChecked ? row[indeterminateField] : indeterminate,
977
- "is--hidden": !isVisible
978
- }],
979
- ...ons
980
- }, checkVNs)
1084
+ (0, import_vue.h)(
1085
+ "span",
1086
+ {
1087
+ class: [
1088
+ "vxe-cell--checkbox",
1089
+ {
1090
+ "is--checked": isChecked,
1091
+ "is--disabled": isDisabled,
1092
+ "is--indeterminate": indeterminateField && !isChecked ? row[indeterminateField] : indeterminate,
1093
+ "is--hidden": !isVisible
1094
+ }
1095
+ ],
1096
+ ...ons
1097
+ },
1098
+ checkVNs
1099
+ )
981
1100
  ]);
982
1101
  },
983
1102
  renderDeepSelectionCellByProp(params) {
@@ -1014,28 +1133,43 @@ const Cell = {
1014
1133
  }
1015
1134
  }
1016
1135
  return renderCellBaseVNs(params, [
1017
- showIcon && (!visibleMethod || visibleMethod(params)) ? (0, import_vue.h)("div", {
1018
- class: ["vxe-table--expanded", {
1019
- "is--active": isActive
1020
- }]
1021
- }, [
1022
- (0, import_vue.h)("span", {
1023
- class: "vxe-table--expand-btn",
1024
- onMousedown(evnt) {
1025
- evnt.stopPropagation();
1026
- },
1027
- onClick(evnt) {
1028
- $table.triggerRowExpandEvent(evnt, params);
1029
- }
1030
- }, [
1031
- (0, import_vue.h)("i", {
1032
- class: isLazyLoading ? iconLoaded || getIcon().TABLE_EXPAND_LOADED : isActive ? iconOpen || getIcon().TABLE_EXPAND_OPEN : iconClose || getIcon().TABLE_EXPAND_CLOSE
1033
- })
1034
- ])
1035
- ]) : renderEmptyElement($table),
1036
- defaultSlot || labelField ? (0, import_vue.h)("div", {
1037
- class: "vxe-table--expand-label"
1038
- }, defaultSlot ? $table.callSlot(defaultSlot, params) : import_xe_utils.default.get(row, labelField)) : renderEmptyElement($table)
1136
+ showIcon && (!visibleMethod || visibleMethod(params)) ? (0, import_vue.h)(
1137
+ "div",
1138
+ {
1139
+ class: [
1140
+ "vxe-table--expanded",
1141
+ {
1142
+ "is--active": isActive
1143
+ }
1144
+ ]
1145
+ },
1146
+ [
1147
+ (0, import_vue.h)(
1148
+ "span",
1149
+ {
1150
+ class: "vxe-table--expand-btn",
1151
+ onMousedown(evnt) {
1152
+ evnt.stopPropagation();
1153
+ },
1154
+ onClick(evnt) {
1155
+ $table.triggerRowExpandEvent(evnt, params);
1156
+ }
1157
+ },
1158
+ [
1159
+ (0, import_vue.h)("i", {
1160
+ class: isLazyLoading ? iconLoaded || getIcon().TABLE_EXPAND_LOADED : isActive ? iconOpen || getIcon().TABLE_EXPAND_OPEN : iconClose || getIcon().TABLE_EXPAND_CLOSE
1161
+ })
1162
+ ]
1163
+ )
1164
+ ]
1165
+ ) : renderEmptyElement($table),
1166
+ defaultSlot || labelField ? (0, import_vue.h)(
1167
+ "div",
1168
+ {
1169
+ class: "vxe-table--expand-label"
1170
+ },
1171
+ defaultSlot ? $table.callSlot(defaultSlot, params) : import_xe_utils.default.get(row, labelField)
1172
+ ) : renderEmptyElement($table)
1039
1173
  ]);
1040
1174
  },
1041
1175
  renderExpandData(params) {
@@ -1082,19 +1216,13 @@ const Cell = {
1082
1216
  * 排序和筛选
1083
1217
  */
1084
1218
  renderSortAndFilterHeader(params) {
1085
- return renderHeaderCellBaseVNs(
1086
- params,
1087
- Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params).concat(Cell.renderFilterIcon(params)))
1088
- );
1219
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params).concat(Cell.renderFilterIcon(params))));
1089
1220
  },
1090
1221
  /**
1091
1222
  * 排序
1092
1223
  */
1093
1224
  renderSortHeader(params) {
1094
- return renderHeaderCellBaseVNs(
1095
- params,
1096
- Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params))
1097
- );
1225
+ return renderHeaderCellBaseVNs(params, Cell.renderHeaderTitle(params).concat(Cell.renderSortIcon(params)));
1098
1226
  },
1099
1227
  renderSortIcon(params) {
1100
1228
  const { $table, column } = params;
@@ -1105,30 +1233,42 @@ const Cell = {
1105
1233
  if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
1106
1234
  const sortSlot = slots ? slots.sort : null;
1107
1235
  return sortSlot ? (0, import_vn.getSlotVNs)($table.callSlot(sortSlot, params)) : [
1108
- (0, import_vue.h)("span", {
1109
- class: ["vxe-cell--sort", `vxe-cell--sort-${iconLayout}-layout`]
1110
- }, [
1111
- (0, import_vue.h)("i", {
1112
- class: ["vxe-sort--asc-btn", iconAsc || getIcon().TABLE_SORT_ASC, {
1113
- "sort--active": order === "asc"
1114
- }],
1115
- title: import_xe_utils.default.eqNull(ascTitle) ? getI18n("vxe.table.sortAsc") : `${ascTitle || ""}`,
1116
- onClick: allowBtn ? (evnt) => {
1117
- evnt.stopPropagation();
1118
- $table.triggerSortEvent(evnt, column, "asc");
1119
- } : void 0
1120
- }),
1121
- (0, import_vue.h)("i", {
1122
- class: ["vxe-sort--desc-btn", iconDesc || getIcon().TABLE_SORT_DESC, {
1123
- "sort--active": order === "desc"
1124
- }],
1125
- title: import_xe_utils.default.eqNull(descTitle) ? getI18n("vxe.table.sortDesc") : `${descTitle || ""}`,
1126
- onClick: allowBtn ? (evnt) => {
1127
- evnt.stopPropagation();
1128
- $table.triggerSortEvent(evnt, column, "desc");
1129
- } : void 0
1130
- })
1131
- ])
1236
+ (0, import_vue.h)(
1237
+ "span",
1238
+ {
1239
+ class: ["vxe-cell--sort", `vxe-cell--sort-${iconLayout}-layout`]
1240
+ },
1241
+ [
1242
+ (0, import_vue.h)("i", {
1243
+ class: [
1244
+ "vxe-sort--asc-btn",
1245
+ iconAsc || getIcon().TABLE_SORT_ASC,
1246
+ {
1247
+ "sort--active": order === "asc"
1248
+ }
1249
+ ],
1250
+ title: import_xe_utils.default.eqNull(ascTitle) ? getI18n("vxe.table.sortAsc") : `${ascTitle || ""}`,
1251
+ onClick: allowBtn ? (evnt) => {
1252
+ evnt.stopPropagation();
1253
+ $table.triggerSortEvent(evnt, column, "asc");
1254
+ } : void 0
1255
+ }),
1256
+ (0, import_vue.h)("i", {
1257
+ class: [
1258
+ "vxe-sort--desc-btn",
1259
+ iconDesc || getIcon().TABLE_SORT_DESC,
1260
+ {
1261
+ "sort--active": order === "desc"
1262
+ }
1263
+ ],
1264
+ title: import_xe_utils.default.eqNull(descTitle) ? getI18n("vxe.table.sortDesc") : `${descTitle || ""}`,
1265
+ onClick: allowBtn ? (evnt) => {
1266
+ evnt.stopPropagation();
1267
+ $table.triggerSortEvent(evnt, column, "desc");
1268
+ } : void 0
1269
+ })
1270
+ ]
1271
+ )
1132
1272
  ];
1133
1273
  }
1134
1274
  return [];
@@ -1148,21 +1288,28 @@ const Cell = {
1148
1288
  const { showIcon, iconNone, iconMatch, iconVisibleMethod } = filterOpts;
1149
1289
  if (showIcon && (!iconVisibleMethod || iconVisibleMethod(params))) {
1150
1290
  return [
1151
- (0, import_vue.h)("span", {
1152
- class: ["vxe-cell--filter", {
1153
- "is--active": filterStore.visible && filterStore.column === column
1154
- }],
1155
- onClick(evnt) {
1156
- if ($table.triggerFilterEvent) {
1157
- $table.triggerFilterEvent(evnt, params.column, params);
1291
+ (0, import_vue.h)(
1292
+ "span",
1293
+ {
1294
+ class: [
1295
+ "vxe-cell--filter",
1296
+ {
1297
+ "is--active": filterStore.visible && filterStore.column === column
1298
+ }
1299
+ ],
1300
+ onClick(evnt) {
1301
+ if ($table.triggerFilterEvent) {
1302
+ $table.triggerFilterEvent(evnt, params.column, params);
1303
+ }
1158
1304
  }
1159
- }
1160
- }, [
1161
- (0, import_vue.h)("i", {
1162
- class: ["vxe-filter--btn", hasFilter ? iconMatch || getIcon().TABLE_FILTER_MATCH : iconNone || getIcon().TABLE_FILTER_NONE],
1163
- title: getI18n("vxe.table.filter")
1164
- })
1165
- ])
1305
+ },
1306
+ [
1307
+ (0, import_vue.h)("i", {
1308
+ class: ["vxe-filter--btn", hasFilter ? iconMatch || getIcon().TABLE_FILTER_MATCH : iconNone || getIcon().TABLE_FILTER_NONE],
1309
+ title: getI18n("vxe.table.filter")
1310
+ })
1311
+ ]
1312
+ )
1166
1313
  ];
1167
1314
  }
1168
1315
  return [];
@@ -1190,18 +1337,24 @@ const Cell = {
1190
1337
  if (isEnableEdit) {
1191
1338
  const { showAsterisk, showIcon, icon } = editOpts;
1192
1339
  editIconVNs = [
1193
- isRequired && showAsterisk ? (0, import_vue.h)("span", {
1194
- class: "vxe-cell--required-icon"
1195
- }, [
1196
- (0, import_vue.h)("i")
1197
- ]) : renderEmptyElement($table),
1198
- editRenderOpts && showIcon ? (0, import_vue.h)("span", {
1199
- class: "vxe-cell--edit-icon"
1200
- }, import_xe_utils.default.isFunction(icon) ? (0, import_vn.getSlotVNs)(icon({})) : [
1201
- (0, import_vue.h)("i", {
1202
- class: icon || getIcon().TABLE_EDIT
1203
- })
1204
- ]) : renderEmptyElement($table)
1340
+ isRequired && showAsterisk ? (0, import_vue.h)(
1341
+ "span",
1342
+ {
1343
+ class: "vxe-cell--required-icon"
1344
+ },
1345
+ [(0, import_vue.h)("i")]
1346
+ ) : renderEmptyElement($table),
1347
+ editRenderOpts && showIcon ? (0, import_vue.h)(
1348
+ "span",
1349
+ {
1350
+ class: "vxe-cell--edit-icon"
1351
+ },
1352
+ import_xe_utils.default.isFunction(icon) ? (0, import_vn.getSlotVNs)(icon({})) : [
1353
+ (0, import_vue.h)("i", {
1354
+ class: icon || getIcon().TABLE_EDIT
1355
+ })
1356
+ ]
1357
+ ) : renderEmptyElement($table)
1205
1358
  ];
1206
1359
  }
1207
1360
  return renderHeaderCellBaseVNs(
@@ -1287,9 +1440,13 @@ const Cell = {
1287
1440
  }
1288
1441
  if (formatter) {
1289
1442
  return renderCellBaseVNs(params, [
1290
- (0, import_vue.h)("span", {
1291
- class: "vxe-cell--label"
1292
- }, getDefaultCellLabel(cellParams))
1443
+ (0, import_vue.h)(
1444
+ "span",
1445
+ {
1446
+ class: "vxe-cell--label"
1447
+ },
1448
+ getDefaultCellLabel(cellParams)
1449
+ )
1293
1450
  ]);
1294
1451
  }
1295
1452
  return Cell.renderDefaultCell(cellParams);