vxe-table 4.23.8 → 4.23.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.esm.js +5715 -3783
- package/es/components.d.ts +1 -0
- package/es/components.js +2 -7
- package/es/grid/src/emits.js +1 -15
- package/es/grid/src/grid.js +397 -120
- package/es/index.esm.js +1 -0
- package/es/index.js +1 -0
- package/es/table/module/custom/hook.js +49 -42
- package/es/table/module/custom/panel.js +777 -527
- package/es/table/module/edit/hook.js +140 -62
- package/es/table/module/export/export-panel.js +399 -316
- package/es/table/module/export/hook.js +395 -337
- package/es/table/module/export/import-panel.js +152 -123
- package/es/table/module/filter/hook.js +16 -2
- package/es/table/module/filter/panel.js +146 -84
- package/es/table/module/keyboard/hook.js +8 -4
- package/es/table/module/menu/panel.js +197 -126
- package/es/table/render/index.js +151 -98
- package/es/table/src/body.js +355 -233
- package/es/table/src/cell.js +426 -269
- package/es/table/src/columnInfo.js +1 -0
- package/es/table/src/footer.js +144 -99
- package/es/table/src/group.js +7 -3
- package/es/table/src/header.js +229 -172
- package/es/table/src/table.js +1503 -1030
- package/es/table/src/util.js +15 -19
- package/es/toolbar/src/toolbar.js +132 -75
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +9 -6
- package/es/ui/src/log.js +1 -1
- package/es/ui/src/utils.d.ts +1 -1
- package/lib/components.js +2 -7
- package/lib/grid/src/emits.js +1 -15
- package/lib/grid/src/grid.js +397 -120
- package/lib/index.common.js +1 -0
- package/lib/index.js +1 -0
- package/lib/index.umd.js +5732 -3800
- package/lib/index.umd.min.js +3 -3
- package/lib/table/module/custom/hook.js +49 -42
- package/lib/table/module/custom/panel.js +777 -527
- package/lib/table/module/edit/hook.js +140 -62
- package/lib/table/module/export/export-panel.js +399 -316
- package/lib/table/module/export/hook.js +395 -337
- package/lib/table/module/export/import-panel.js +152 -123
- package/lib/table/module/filter/hook.js +16 -2
- package/lib/table/module/filter/panel.js +146 -84
- package/lib/table/module/keyboard/hook.js +8 -4
- package/lib/table/module/menu/panel.js +197 -126
- package/lib/table/render/index.js +151 -98
- package/lib/table/src/body.js +355 -233
- package/lib/table/src/cell.js +426 -269
- package/lib/table/src/columnInfo.js +1 -0
- package/lib/table/src/footer.js +144 -99
- package/lib/table/src/group.js +7 -3
- package/lib/table/src/header.js +229 -172
- package/lib/table/src/table.js +1471 -1029
- package/lib/table/src/util.js +15 -19
- package/lib/toolbar/src/toolbar.js +132 -75
- package/lib/ui/index.js +1 -1
- package/lib/ui/src/dom.js +9 -6
- package/lib/ui/src/log.js +1 -1
- package/package.json +2 -2
- package/packages/colgroup/index.ts +22 -22
- package/packages/column/index.ts +22 -22
- package/packages/components.ts +41 -44
- package/packages/grid/index.ts +18 -18
- package/packages/grid/src/emits.ts +5 -19
- package/packages/grid/src/grid.ts +2229 -1925
- package/packages/grid/src/props.ts +22 -23
- package/packages/index.ts +11 -11
- package/packages/locale/lang/fr-FR.ts +15 -15
- package/packages/locale/lang/it-IT.ts +4 -4
- package/packages/locale/lang/uk-UA.ts +1 -1
- package/packages/locale/lang/uz-UZ.ts +13 -13
- package/packages/locale/lang/zh-CN.ts +907 -907
- package/packages/table/index.ts +26 -26
- package/packages/table/module/custom/hook.ts +510 -503
- package/packages/table/module/custom/panel.ts +2002 -1743
- package/packages/table/module/edit/hook.ts +1224 -1131
- package/packages/table/module/export/export-panel.ts +697 -611
- package/packages/table/module/export/hook.ts +2160 -2059
- package/packages/table/module/export/import-panel.ts +319 -279
- package/packages/table/module/export/util.ts +25 -24
- package/packages/table/module/filter/hook.ts +519 -501
- package/packages/table/module/filter/panel.ts +368 -304
- package/packages/table/module/keyboard/hook.ts +498 -494
- package/packages/table/module/menu/hook.ts +330 -330
- package/packages/table/module/menu/panel.ts +272 -201
- package/packages/table/module/validator/hook.ts +653 -635
- package/packages/table/render/index.ts +1819 -1744
- package/packages/table/src/body.ts +1078 -955
- package/packages/table/src/cell.ts +1524 -1359
- package/packages/table/src/column.ts +192 -192
- package/packages/table/src/columnInfo.ts +232 -232
- package/packages/table/src/emits.ts +134 -134
- package/packages/table/src/footer.ts +425 -380
- package/packages/table/src/group.ts +67 -63
- package/packages/table/src/header.ts +642 -581
- package/packages/table/src/props.ts +336 -336
- package/packages/table/src/store.ts +14 -14
- package/packages/table/src/table.ts +16011 -15454
- package/packages/table/src/use/cell-view.ts +41 -44
- package/packages/table/src/use/index.ts +1 -1
- package/packages/table/src/util.ts +1206 -1216
- package/packages/toolbar/index.ts +18 -18
- package/packages/toolbar/src/toolbar.ts +768 -706
- package/packages/ui/index.ts +519 -520
- package/packages/ui/src/anime.ts +51 -52
- package/packages/ui/src/comp.ts +3 -3
- package/packages/ui/src/dom.ts +466 -463
- package/packages/ui/src/log.ts +19 -19
- package/packages/ui/src/utils.ts +66 -66
- package/packages/ui/src/vn.ts +55 -55
- package/packages/v-x-e-table/index.d.ts +3 -3
- package/packages/v-x-e-table/index.ts +3 -3
- package/types/all.d.ts +76 -76
- package/types/index.d.ts +4 -4
- /package/dist/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/dist/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/dist/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/es/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/es/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/es/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
- /package/lib/{iconfont.1793007753347.ttf → iconfont.1793009263429.ttf} +0 -0
- /package/lib/{iconfont.1793007753347.woff → iconfont.1793009263429.woff} +0 -0
- /package/lib/{iconfont.1793007753347.woff2 → iconfont.1793009263429.woff2} +0 -0
|
@@ -95,14 +95,22 @@ function isImmediateCell(renderOpts, params) {
|
|
|
95
95
|
function getCellLabelVNs(renderOpts, params, cellLabel, opts) {
|
|
96
96
|
const { placeholder } = renderOpts;
|
|
97
97
|
return [
|
|
98
|
-
(0, import_vue.h)(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
(0, import_vue.h)(
|
|
99
|
+
"span",
|
|
100
|
+
{
|
|
101
|
+
key: 1,
|
|
102
|
+
class: ["vxe-cell--label", opts ? opts.class : ""]
|
|
103
|
+
},
|
|
104
|
+
placeholder && (0, import_utils.isEmptyValue)(cellLabel) ? [
|
|
105
|
+
(0, import_vue.h)(
|
|
106
|
+
"span",
|
|
107
|
+
{
|
|
108
|
+
class: "vxe-cell--placeholder"
|
|
109
|
+
},
|
|
110
|
+
(0, import_utils.formatText)((0, import_utils.getFuncText)(placeholder), 1)
|
|
111
|
+
)
|
|
112
|
+
] : (0, import_utils.formatText)(cellLabel, 1)
|
|
113
|
+
)
|
|
106
114
|
];
|
|
107
115
|
}
|
|
108
116
|
function getNativeElementOns(renderOpts, params, eFns) {
|
|
@@ -246,30 +254,35 @@ function getFilterOns(renderOpts, params, option) {
|
|
|
246
254
|
function getFloatingFilterOns(renderOpts, params, option) {
|
|
247
255
|
const { $table, column } = params;
|
|
248
256
|
if ((0, import_vn.hasInputType)(renderOpts)) {
|
|
249
|
-
return getComponentOns(
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
saveFilterEvent(params);
|
|
257
|
+
return getComponentOns(
|
|
258
|
+
renderOpts,
|
|
259
|
+
params,
|
|
260
|
+
{
|
|
261
|
+
model(value) {
|
|
262
|
+
option.data = value;
|
|
263
|
+
},
|
|
264
|
+
change() {
|
|
265
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
266
|
+
},
|
|
267
|
+
clear() {
|
|
268
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
269
|
+
saveFilterEvent(params);
|
|
270
|
+
},
|
|
271
|
+
blur() {
|
|
272
|
+
$table.saveFilterByEvent(new Event("change"), column);
|
|
273
|
+
}
|
|
267
274
|
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
275
|
+
renderOpts.name === "VxeNumberInput" ? {
|
|
276
|
+
[(0, import_vn.getOnName)("plus-number")]() {
|
|
277
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
278
|
+
saveFilterEvent(params);
|
|
279
|
+
},
|
|
280
|
+
[(0, import_vn.getOnName)("minus-number")]() {
|
|
281
|
+
updateFilterChangeOption(params, !(0, import_utils.isEmptyValue)(option.data), option);
|
|
282
|
+
saveFilterEvent(params);
|
|
283
|
+
}
|
|
284
|
+
} : {}
|
|
285
|
+
);
|
|
273
286
|
}
|
|
274
287
|
return getComponentOns(renderOpts, params, {
|
|
275
288
|
model(value) {
|
|
@@ -337,9 +350,13 @@ function nativeInputCellRender(renderOpts, renderParams) {
|
|
|
337
350
|
const { row, column } = renderParams;
|
|
338
351
|
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
339
352
|
const cellVNs = [
|
|
340
|
-
(0, import_vue.h)(
|
|
341
|
-
|
|
342
|
-
|
|
353
|
+
(0, import_vue.h)(
|
|
354
|
+
"span",
|
|
355
|
+
{
|
|
356
|
+
key: 1
|
|
357
|
+
},
|
|
358
|
+
cellValue
|
|
359
|
+
)
|
|
343
360
|
];
|
|
344
361
|
return getNativeInputRenderCellVNs(cellValue, cellVNs, renderOpts, renderParams);
|
|
345
362
|
}
|
|
@@ -436,10 +453,14 @@ function renderNativeOptgroups(renderOpts, params, renderOptionsMethods) {
|
|
|
436
453
|
const groupLabel = optionGroupProps.label || "label";
|
|
437
454
|
if (optionGroups) {
|
|
438
455
|
return optionGroups.map((group, gIndex) => {
|
|
439
|
-
return (0, import_vue.h)(
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
456
|
+
return (0, import_vue.h)(
|
|
457
|
+
"optgroup",
|
|
458
|
+
{
|
|
459
|
+
key: gIndex,
|
|
460
|
+
label: group[groupLabel]
|
|
461
|
+
},
|
|
462
|
+
renderOptionsMethods(group[groupOptions], renderOpts, params)
|
|
463
|
+
);
|
|
443
464
|
});
|
|
444
465
|
}
|
|
445
466
|
return [];
|
|
@@ -453,13 +474,17 @@ function renderNativeOptions(options, renderOpts, params) {
|
|
|
453
474
|
const cellValue = isImmediateCell(renderOpts, params) ? (0, import_util.getCellValue)(row, column) : column.model.value;
|
|
454
475
|
if (options) {
|
|
455
476
|
return options.map((option, oIndex) => {
|
|
456
|
-
return (0, import_vue.h)(
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
477
|
+
return (0, import_vue.h)(
|
|
478
|
+
"option",
|
|
479
|
+
{
|
|
480
|
+
key: oIndex,
|
|
481
|
+
value: option[valueProp],
|
|
482
|
+
disabled: option[disabledProp],
|
|
483
|
+
/* eslint-disable eqeqeq */
|
|
484
|
+
selected: option[valueProp] == cellValue
|
|
485
|
+
},
|
|
486
|
+
option[labelProp]
|
|
487
|
+
);
|
|
463
488
|
});
|
|
464
489
|
}
|
|
465
490
|
return [];
|
|
@@ -500,9 +525,7 @@ function defaultFloatingFilterRender(renderOpts, params) {
|
|
|
500
525
|
];
|
|
501
526
|
}
|
|
502
527
|
function defaultFilterOptions() {
|
|
503
|
-
return [
|
|
504
|
-
{ data: null }
|
|
505
|
-
];
|
|
528
|
+
return [{ data: null }];
|
|
506
529
|
}
|
|
507
530
|
function oldFilterRender(renderOpts, params) {
|
|
508
531
|
const { column } = params;
|
|
@@ -621,16 +644,17 @@ function handleTreeSelectCellValue(cellValue, renderOpts) {
|
|
|
621
644
|
const childrenProp = optionProps.children || "children";
|
|
622
645
|
if (!(cellValue === null || cellValue === void 0)) {
|
|
623
646
|
const keyMaps = {};
|
|
624
|
-
import_xe_utils.default.eachTree(
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
647
|
+
import_xe_utils.default.eachTree(
|
|
648
|
+
options,
|
|
649
|
+
(item) => {
|
|
650
|
+
keyMaps[import_xe_utils.default.get(item, valueProp)] = item;
|
|
651
|
+
},
|
|
652
|
+
{ children: childrenProp }
|
|
653
|
+
);
|
|
654
|
+
return import_xe_utils.default.map(import_xe_utils.default.isArray(cellValue) ? cellValue : [cellValue], (value) => {
|
|
655
|
+
const item = keyMaps[value];
|
|
656
|
+
return item ? import_xe_utils.default.get(item, labelProp) : item;
|
|
657
|
+
}).join(", ");
|
|
634
658
|
}
|
|
635
659
|
return "";
|
|
636
660
|
}
|
|
@@ -692,9 +716,14 @@ function handleNumberCell(cellValue, renderOpts, params) {
|
|
|
692
716
|
}
|
|
693
717
|
}
|
|
694
718
|
}
|
|
695
|
-
return getCellLabelVNs(
|
|
696
|
-
|
|
697
|
-
|
|
719
|
+
return getCellLabelVNs(
|
|
720
|
+
renderOpts,
|
|
721
|
+
params,
|
|
722
|
+
cellValue,
|
|
723
|
+
isNegative ? {
|
|
724
|
+
class: "is--negative"
|
|
725
|
+
} : {}
|
|
726
|
+
);
|
|
698
727
|
}
|
|
699
728
|
function handleFormatDatePicker(renderOpts, renderParams) {
|
|
700
729
|
const { props = {} } = renderOpts;
|
|
@@ -751,10 +780,14 @@ function handleSetSelectValue(renderOpts, renderParams) {
|
|
|
751
780
|
}
|
|
752
781
|
}
|
|
753
782
|
if (isMultiVal) {
|
|
754
|
-
import_xe_utils.default.set(
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
783
|
+
import_xe_utils.default.set(
|
|
784
|
+
row,
|
|
785
|
+
field,
|
|
786
|
+
(isMultiVal ? cellValue.split(",") : [cellValue]).map((label) => {
|
|
787
|
+
const item = labelMpas[label];
|
|
788
|
+
return item ? item[valueProp] : label;
|
|
789
|
+
})
|
|
790
|
+
);
|
|
758
791
|
} else {
|
|
759
792
|
import_xe_utils.default.set(row, field, cellValue);
|
|
760
793
|
}
|
|
@@ -1077,19 +1110,24 @@ renderer.mixin({
|
|
|
1077
1110
|
return [
|
|
1078
1111
|
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1079
1112
|
...getCellEditProps(renderOpts, params, cellValue, seProps),
|
|
1080
|
-
...getComponentOns(
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
(
|
|
1113
|
+
...getComponentOns(
|
|
1114
|
+
renderOpts,
|
|
1115
|
+
params,
|
|
1116
|
+
{
|
|
1117
|
+
model(cellValue2) {
|
|
1118
|
+
model.update = true;
|
|
1119
|
+
model.value = cellValue2;
|
|
1120
|
+
(0, import_util.setCellValue)(row, column, cellValue2);
|
|
1121
|
+
},
|
|
1122
|
+
change() {
|
|
1123
|
+
$table.updateStatus(params);
|
|
1124
|
+
},
|
|
1125
|
+
blur() {
|
|
1126
|
+
$table.handleCellRuleUpdateStatus("blur", params);
|
|
1127
|
+
}
|
|
1085
1128
|
},
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
},
|
|
1089
|
-
blur() {
|
|
1090
|
-
$table.handleCellRuleUpdateStatus("blur", params);
|
|
1091
|
-
}
|
|
1092
|
-
}, seOs)
|
|
1129
|
+
seOs
|
|
1130
|
+
)
|
|
1093
1131
|
})
|
|
1094
1132
|
];
|
|
1095
1133
|
},
|
|
@@ -1117,13 +1155,18 @@ renderer.mixin({
|
|
|
1117
1155
|
return [
|
|
1118
1156
|
(0, import_vue.h)(getDefaultComponent(renderOpts), {
|
|
1119
1157
|
...getCellEditProps(renderOpts, params, cellValue, seProps),
|
|
1120
|
-
...getComponentOns(
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
(
|
|
1125
|
-
|
|
1126
|
-
|
|
1158
|
+
...getComponentOns(
|
|
1159
|
+
renderOpts,
|
|
1160
|
+
params,
|
|
1161
|
+
{
|
|
1162
|
+
model(cellValue2) {
|
|
1163
|
+
model.update = true;
|
|
1164
|
+
model.value = cellValue2;
|
|
1165
|
+
(0, import_util.setCellValue)(row, column, cellValue2);
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
seOs
|
|
1169
|
+
)
|
|
1127
1170
|
})
|
|
1128
1171
|
];
|
|
1129
1172
|
},
|
|
@@ -1432,20 +1475,30 @@ renderer.mixin({
|
|
|
1432
1475
|
const customSize = props ? props.size : null;
|
|
1433
1476
|
const vSize = customSize || computeSize.value;
|
|
1434
1477
|
const cellValue = import_xe_utils.default.get(row, column.field);
|
|
1435
|
-
return (0, import_vue.h)(
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1478
|
+
return (0, import_vue.h)(
|
|
1479
|
+
"span",
|
|
1480
|
+
{
|
|
1481
|
+
class: [
|
|
1482
|
+
"vxe-color-picker--readonly",
|
|
1483
|
+
{
|
|
1484
|
+
[`size--${vSize}`]: vSize
|
|
1485
|
+
}
|
|
1486
|
+
]
|
|
1487
|
+
},
|
|
1488
|
+
[
|
|
1489
|
+
(0, import_vue.h)("div", {
|
|
1490
|
+
class: [
|
|
1491
|
+
"vxe-color-picker--readonly-color",
|
|
1492
|
+
{
|
|
1493
|
+
"is--empty": !cellValue
|
|
1494
|
+
}
|
|
1495
|
+
],
|
|
1496
|
+
style: cellValue ? {
|
|
1497
|
+
backgroundColor: cellValue
|
|
1498
|
+
} : void 0
|
|
1499
|
+
})
|
|
1500
|
+
]
|
|
1501
|
+
);
|
|
1449
1502
|
}
|
|
1450
1503
|
},
|
|
1451
1504
|
VxeIconPicker: {
|