@geelato/web-vue 2.57.1 → 2.58.1

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 (81) hide show
  1. package/dist/arco-vue.js +872 -535
  2. package/dist/arco-vue.js.map +1 -1
  3. package/dist/arco-vue.min.js +1645 -1546
  4. package/dist/arco-vue.min.js.map +1 -1
  5. package/dist/arco.css +39 -8
  6. package/dist/arco.min.css +1 -1
  7. package/es/_components/picker/input-range.d.ts +2 -2
  8. package/es/_components/picker/input.d.ts +1 -1
  9. package/es/_components/virtual-list-v2/virtual-list.d.ts +3 -3
  10. package/es/_utils/array.d.ts +1 -1
  11. package/es/_utils/array.js +18 -1
  12. package/es/date-picker/index.d.ts +7 -7
  13. package/es/date-picker/panels/date/index.d.ts +2 -2
  14. package/es/date-picker/panels/week/index.d.ts +2 -2
  15. package/es/date-picker/picker-panel.d.ts +4 -4
  16. package/es/date-picker/picker.d.ts +5 -5
  17. package/es/date-picker/range-picker-panel.d.ts +4 -4
  18. package/es/date-picker/range-picker.d.ts +7 -7
  19. package/es/drawer/drawer.d.ts +24 -0
  20. package/es/drawer/drawer.js +61 -6
  21. package/es/drawer/index.d.ts +45 -0
  22. package/es/drawer/style/index.css +10 -0
  23. package/es/drawer/style/index.less +12 -0
  24. package/es/index.css +39 -8
  25. package/es/mention/index.d.ts +3 -3
  26. package/es/mention/mention.d.ts +1 -1
  27. package/es/menu/item.d.ts +1 -1
  28. package/es/menu/sub-menu-pop.d.ts +1 -1
  29. package/es/message/message.d.ts +1 -1
  30. package/es/modal/index.d.ts +33 -3
  31. package/es/modal/modal.d.ts +16 -1
  32. package/es/modal/modal.js +23 -6
  33. package/es/modal/modal.vue_vue_type_script_lang.js +26 -2
  34. package/es/modal/style/index.css +7 -1
  35. package/es/modal/style/index.less +8 -1
  36. package/es/pagination/index.d.ts +3 -3
  37. package/es/pagination/pagination.d.ts +1 -1
  38. package/es/table/context.d.ts +3 -0
  39. package/es/table/hooks/use-row-selection.js +5 -3
  40. package/es/table/interface.d.ts +1 -1
  41. package/es/table/style/index.css +22 -7
  42. package/es/table/style/index.less +25 -8
  43. package/es/table/table-operation-td.js +6 -6
  44. package/es/table/table-operation-th.js +19 -7
  45. package/es/table/table-td.js +2 -2
  46. package/es/table/table.js +165 -33
  47. package/es/table/utils.d.ts +1 -1
  48. package/es/table/utils.js +9 -5
  49. package/es/time-picker/index.d.ts +14 -14
  50. package/es/time-picker/panel.d.ts +2 -2
  51. package/es/time-picker/range-panel.d.ts +2 -2
  52. package/es/time-picker/time-picker.d.ts +7 -7
  53. package/es/tree/index.d.ts +6 -6
  54. package/es/tree/tree.d.ts +3 -3
  55. package/es/tree-select/index.d.ts +12 -12
  56. package/es/tree-select/panel.d.ts +6 -6
  57. package/es/tree-select/tree-select.d.ts +6 -6
  58. package/es/typography/index.d.ts +3 -3
  59. package/es/typography/title.d.ts +3 -3
  60. package/json/vetur-attributes.json +2491 -2491
  61. package/json/vetur-tags.json +889 -889
  62. package/json/web-types.json +4726 -4726
  63. package/lib/_utils/array.js +18 -1
  64. package/lib/drawer/drawer.js +63 -8
  65. package/lib/drawer/style/index.css +10 -0
  66. package/lib/drawer/style/index.less +12 -0
  67. package/lib/index.css +39 -8
  68. package/lib/modal/modal.js +23 -6
  69. package/lib/modal/modal.vue_vue_type_script_lang.js +36 -12
  70. package/lib/modal/style/index.css +7 -1
  71. package/lib/modal/style/index.less +8 -1
  72. package/lib/table/hooks/use-row-selection.js +5 -3
  73. package/lib/table/style/index.css +22 -7
  74. package/lib/table/style/index.less +25 -8
  75. package/lib/table/table-operation-td.js +6 -6
  76. package/lib/table/table-operation-th.js +19 -7
  77. package/lib/table/table-td.js +2 -2
  78. package/lib/table/table.js +164 -32
  79. package/lib/table/utils.js +9 -5
  80. package/package.json +25 -24
  81. package/LICENSE +0 -21
@@ -29,15 +29,27 @@ var OperationTh = vue.defineComponent({
29
29
  const prefixCls = globalConfig.getPrefixCls("table");
30
30
  const tableCtx = vue.inject(context.tableInjectionKey, {});
31
31
  const checkboxStatus = vue.computed(() => {
32
- var _a, _b, _c, _d;
32
+ var _a, _b, _c, _d, _e;
33
33
  let checked = false;
34
34
  let indeterminate = false;
35
- const currentSelectedEnabledRowKeys = (_b = (_a = tableCtx.currentSelectedRowKeys) == null ? void 0 : _a.filter((key) => {
36
- var _a2, _b2;
37
- return (_b2 = (_a2 = tableCtx.currentAllEnabledRowKeys) == null ? void 0 : _a2.includes(key)) != null ? _b2 : true;
38
- })) != null ? _b : [];
39
- const selectedNumber = currentSelectedEnabledRowKeys.length;
40
- const totalEnabledNumber = (_d = (_c = tableCtx.currentAllEnabledRowKeys) == null ? void 0 : _c.length) != null ? _d : 0;
35
+ const totalEnabledNumber = (_b = (_a = tableCtx.currentAllEnabledRowKeys) == null ? void 0 : _a.length) != null ? _b : 0;
36
+ if (totalEnabledNumber === 0) {
37
+ return {
38
+ checked,
39
+ indeterminate
40
+ };
41
+ }
42
+ const enabledKeySet = (_d = tableCtx.currentAllEnabledRowKeySet) != null ? _d : new Set((_c = tableCtx.currentAllEnabledRowKeys) != null ? _c : []);
43
+ const currentSelectedRowKeys = (_e = tableCtx.currentSelectedRowKeys) != null ? _e : [];
44
+ let selectedNumber = 0;
45
+ for (const key of currentSelectedRowKeys) {
46
+ if (enabledKeySet.has(key)) {
47
+ selectedNumber += 1;
48
+ if (selectedNumber >= totalEnabledNumber) {
49
+ break;
50
+ }
51
+ }
52
+ }
41
53
  if (selectedNumber > 0) {
42
54
  if (selectedNumber >= totalEnabledNumber) {
43
55
  checked = true;
@@ -107,13 +107,13 @@ var Td = vue.defineComponent({
107
107
  };
108
108
  const style = vue.computed(() => {
109
109
  var _a;
110
- const style2 = utils.getStyle(props.column, {
110
+ const fixedStyle = utils.getStyle(props.column, {
111
111
  dataColumns: props.dataColumns,
112
112
  operations: props.operations
113
113
  });
114
114
  const customStyle = getCustomStyle();
115
115
  return {
116
- ...style2,
116
+ ...fixedStyle,
117
117
  ...(_a = props.column) == null ? void 0 : _a.cellStyle,
118
118
  ...customStyle
119
119
  };
@@ -280,7 +280,7 @@ var _Table = vue.defineComponent({
280
280
  const {
281
281
  componentRef: virtualComRef,
282
282
  elementRef: virtualRef
283
- } = useComponentRef.useComponentRef("viewportRef");
283
+ } = useComponentRef.useComponentRef("containerRef");
284
284
  const {
285
285
  componentRef: theadComRef,
286
286
  elementRef: theadRef
@@ -476,6 +476,9 @@ var _Table = vue.defineComponent({
476
476
  currentAllEnabledRowKeys,
477
477
  emit
478
478
  });
479
+ const currentAllEnabledRowKeySet = vue.computed(() => new Set(currentAllEnabledRowKeys.value));
480
+ const currentSelectedRowKeySet = vue.computed(() => new Set(currentSelectedRowKeys.value));
481
+ const selectedRowKeySet = vue.computed(() => new Set(selectedRowKeys.value));
479
482
  const {
480
483
  expandedRowKeys,
481
484
  handleExpand,
@@ -531,18 +534,27 @@ var _Table = vue.defineComponent({
531
534
  expand: _record.expand,
532
535
  isLeaf: _record.isLeaf
533
536
  };
534
- if (_record.children) {
535
- record.isLeaf = false;
536
- record.children = travel(_record.children);
537
+ const recordChildren = _record.children;
538
+ if (Array.isArray(recordChildren)) {
539
+ if (recordChildren.length > 0) {
540
+ record.isLeaf = false;
541
+ record.children = travel(recordChildren);
542
+ } else if (showEmptyTree.value) {
543
+ record.isLeaf = false;
544
+ record.children = [];
545
+ } else {
546
+ record.isLeaf = true;
547
+ }
537
548
  } else if (props.loadMore && !_record.isLeaf) {
538
549
  record.isLeaf = false;
539
- if (lazyLoadData[record.key]) {
540
- record.children = travel(lazyLoadData[record.key]);
550
+ const lazyChildren = lazyLoadData[record.key];
551
+ if (lazyChildren) {
552
+ record.children = travel(lazyChildren);
541
553
  }
542
554
  } else {
543
555
  record.isLeaf = true;
544
556
  }
545
- record.hasSubtree = Boolean(record.children ? props.hideExpandButtonOnEmpty ? record.children.length > 0 : true : props.loadMore && !record.isLeaf);
557
+ record.hasSubtree = Boolean(record.children ? props.hideExpandButtonOnEmpty ? record.children.length > 0 : showEmptyTree.value || record.children.length > 0 : props.loadMore && !record.isLeaf);
546
558
  result.push(record);
547
559
  }
548
560
  return result;
@@ -860,7 +872,10 @@ var _Table = vue.defineComponent({
860
872
  resizingColumn,
861
873
  checkStrictly,
862
874
  currentAllEnabledRowKeys,
875
+ currentAllEnabledRowKeySet,
863
876
  currentSelectedRowKeys,
877
+ currentSelectedRowKeySet,
878
+ selectedRowKeySet,
864
879
  addColumn,
865
880
  removeColumn,
866
881
  onSelectAll: handleSelectAll,
@@ -880,7 +895,8 @@ var _Table = vue.defineComponent({
880
895
  [`${prefixCls}-dragging`]: dragState.dragging,
881
896
  [`${prefixCls}-type-selection`]: Boolean(props.rowSelection),
882
897
  [`${prefixCls}-empty`]: props.data && flattenData.value.length === 0,
883
- [`${prefixCls}-layout-fixed`]: props.tableLayoutFixed || isScroll.value.x || splitTable.value || hasEllipsis.value
898
+ [`${prefixCls}-layout-fixed`]: props.tableLayoutFixed || isScroll.value.x || splitTable.value || hasEllipsis.value,
899
+ [`${prefixCls}-virtualized`]: Boolean(props.virtualListProps)
884
900
  }]);
885
901
  const paginationCls = vue.computed(() => [`${prefixCls}-pagination`, {
886
902
  [`${prefixCls}-pagination-left`]: props.pagePosition === "tl" || props.pagePosition === "bl",
@@ -907,6 +923,13 @@ var _Table = vue.defineComponent({
907
923
  }
908
924
  thWidth.value = width;
909
925
  };
926
+ vue.watch(columnWidth, () => {
927
+ if (isVirtualList.value) {
928
+ vue.nextTick(getThWidth);
929
+ }
930
+ }, {
931
+ deep: true
932
+ });
910
933
  const hasScrollBar = vue.ref(false);
911
934
  const isTbodyHasScrollBar = () => {
912
935
  if (tbodyRef.value) {
@@ -979,11 +1002,16 @@ var _Table = vue.defineComponent({
979
1002
  columns: allColumns
980
1003
  });
981
1004
  const getVirtualColumnStyle = (name) => {
982
- if (!isVirtualList.value || !name || !thWidth.value[name]) {
1005
+ var _a;
1006
+ if (!isVirtualList.value || !name) {
1007
+ return void 0;
1008
+ }
1009
+ const width = (_a = columnWidth[name]) != null ? _a : thWidth.value[name];
1010
+ if (!width) {
983
1011
  return void 0;
984
1012
  }
985
1013
  return {
986
- width: `${thWidth.value[name]}px`
1014
+ width: `${width}px`
987
1015
  };
988
1016
  };
989
1017
  const renderSummaryRow = (record, rowIndex) => {
@@ -1099,16 +1127,14 @@ var _Table = vue.defineComponent({
1099
1127
  }
1100
1128
  return null;
1101
1129
  };
1102
- const renderRecord = (record, rowIndex, {
1130
+ const renderRecordRow = (record, rowIndex, {
1103
1131
  indentSize = 0,
1104
1132
  indexPath,
1105
1133
  allowDrag = true
1106
1134
  } = {}) => {
1107
- var _a;
1108
1135
  const currentKey = record.key;
1109
1136
  const currentPath = (indexPath != null ? indexPath : []).concat(rowIndex);
1110
1137
  const expandContent = renderExpandContent(record);
1111
- const showExpand = expandedRowKeys.value.includes(currentKey);
1112
1138
  const isDragTarget = dragState.sourceKey === record.key;
1113
1139
  const dragSourceEvent = dragType.value ? {
1114
1140
  draggable: allowDrag,
@@ -1141,7 +1167,7 @@ var _Table = vue.defineComponent({
1141
1167
  handleDrop(ev);
1142
1168
  }
1143
1169
  } : {};
1144
- return vue.createVNode(vue.Fragment, null, [vue.createVNode(tableTr, vue.mergeProps({
1170
+ return vue.createVNode(tableTr, vue.mergeProps({
1145
1171
  "key": currentKey,
1146
1172
  "class": [{
1147
1173
  [`${prefixCls}-tr-draggable`]: dragType.value === "row",
@@ -1149,15 +1175,15 @@ var _Table = vue.defineComponent({
1149
1175
  }, is.isFunction(props.rowClass) ? props.rowClass(record.raw, rowIndex) : props.rowClass],
1150
1176
  "rowIndex": rowIndex,
1151
1177
  "record": record,
1152
- "checked": props.rowSelection && ((_a = selectedRowKeys.value) == null ? void 0 : _a.includes(currentKey)),
1178
+ "checked": props.rowSelection && selectedRowKeySet.value.has(currentKey),
1153
1179
  "onClick": (ev) => handleRowClick(record, ev),
1154
1180
  "onDblclick": (ev) => handleRowDblclick(record, ev),
1155
1181
  "onContextmenu": (ev) => handleRowContextMenu(record, ev)
1156
1182
  }, dragType.value === "row" ? dragSourceEvent : {}, dragTargetEvent), {
1157
1183
  default: () => [operations.value.map((operation, index2) => {
1158
- var _a2;
1184
+ var _a;
1159
1185
  const cellId = `${rowIndex}-${index2}-${record.key}`;
1160
- const [rowspan, colspan] = props.spanAll ? (_a2 = tableSpan.value[cellId]) != null ? _a2 : [1, 1] : [1, 1];
1186
+ const [rowspan, colspan] = props.spanAll ? (_a = tableSpan.value[cellId]) != null ? _a : [1, 1] : [1, 1];
1161
1187
  if (props.spanAll && removedCells.value.includes(cellId)) {
1162
1188
  return null;
1163
1189
  }
@@ -1177,9 +1203,9 @@ var _Table = vue.defineComponent({
1177
1203
  "drag-handle-icon": slots["drag-handle-icon"]
1178
1204
  });
1179
1205
  }), dataColumns.value.map((column, index2) => {
1180
- var _a2;
1206
+ var _a;
1181
1207
  const cellId = `${rowIndex}-${props.spanAll ? operations.value.length + index2 : index2}-${record.key}`;
1182
- const [rowspan, colspan] = (_a2 = tableSpan.value[cellId]) != null ? _a2 : [1, 1];
1208
+ const [rowspan, colspan] = (_a = tableSpan.value[cellId]) != null ? _a : [1, 1];
1183
1209
  if (removedCells.value.includes(cellId)) {
1184
1210
  return null;
1185
1211
  }
@@ -1210,13 +1236,123 @@ var _Table = vue.defineComponent({
1210
1236
  });
1211
1237
  })],
1212
1238
  tr: slots.tr
1239
+ });
1240
+ };
1241
+ const renderRecord = (record, rowIndex, {
1242
+ indentSize = 0,
1243
+ indexPath,
1244
+ allowDrag = true
1245
+ } = {}) => {
1246
+ const currentKey = record.key;
1247
+ const currentPath = (indexPath != null ? indexPath : []).concat(rowIndex);
1248
+ const expandContent = renderExpandContent(record);
1249
+ const showExpand = expandedRowKeys.value.includes(currentKey);
1250
+ return vue.createVNode(vue.Fragment, null, [renderRecordRow(record, rowIndex, {
1251
+ indentSize,
1252
+ indexPath,
1253
+ allowDrag
1213
1254
  }), showExpand && renderExpand(record, {
1214
1255
  indentSize: indentSize + props.indentSize,
1215
1256
  indexPath: currentPath,
1216
- allowDrag: allowDrag && !isDragTarget,
1257
+ allowDrag,
1217
1258
  expandContent
1218
1259
  })]);
1219
1260
  };
1261
+ const renderVirtualEmptyRow = (key) => {
1262
+ return vue.createVNode(tableTr, {
1263
+ "key": key,
1264
+ "empty": true
1265
+ }, {
1266
+ default: () => [vue.createVNode(tableTd, {
1267
+ "colSpan": dataColumns.value.length + operations.value.length
1268
+ }, {
1269
+ default: () => {
1270
+ var _a, _b, _c, _d, _e;
1271
+ return [(_e = (_d = (_a = slots.empty) == null ? void 0 : _a.call(slots)) != null ? _d : (_c = configCtx == null ? void 0 : (_b = configCtx.slots).empty) == null ? void 0 : _c.call(_b, {
1272
+ component: "table"
1273
+ })) != null ? _e : vue.createVNode(index$3, null, null)];
1274
+ }
1275
+ })]
1276
+ });
1277
+ };
1278
+ const virtualListData = vue.computed(() => {
1279
+ if (!isVirtualList.value || flattenData.value.length === 0) {
1280
+ return [];
1281
+ }
1282
+ const hasSubData = flattenData.value.some((record) => Boolean(record.hasSubtree));
1283
+ const baseIndentSize = hasSubData ? 20 : 0;
1284
+ const expandedKeySet = new Set(expandedRowKeys.value);
1285
+ const list = [];
1286
+ let recordIndex = 0;
1287
+ const travel = (data, indentSize, indexPath) => {
1288
+ data.forEach((record, index2) => {
1289
+ var _a;
1290
+ const currentPath = indexPath.concat(index2);
1291
+ list.push({
1292
+ type: "record",
1293
+ _key: `r-${String(record.key)}`,
1294
+ record,
1295
+ rowIndex: recordIndex,
1296
+ indentSize,
1297
+ indexPath: currentPath
1298
+ });
1299
+ recordIndex += 1;
1300
+ if (!expandedKeySet.has(record.key))
1301
+ return;
1302
+ if (record.hasSubtree) {
1303
+ if (((_a = record.children) == null ? void 0 : _a.length) === 0 && showEmptyTree.value) {
1304
+ list.push({
1305
+ type: "empty-subtree",
1306
+ _key: `empty-subtree-${String(record.key)}`
1307
+ });
1308
+ return;
1309
+ }
1310
+ if (record.children && record.children.length > 0) {
1311
+ travel(record.children, indentSize + props.indentSize, currentPath);
1312
+ }
1313
+ return;
1314
+ }
1315
+ const expandContent = renderExpandContent(record);
1316
+ if (expandContent) {
1317
+ list.push({
1318
+ type: "expand",
1319
+ _key: `expand-${String(record.key)}`,
1320
+ record
1321
+ });
1322
+ }
1323
+ });
1324
+ };
1325
+ travel(flattenData.value, baseIndentSize, []);
1326
+ return list;
1327
+ });
1328
+ const renderVirtualItem = (item) => {
1329
+ if (item.type === "record") {
1330
+ return renderRecordRow(item.record, item.rowIndex, {
1331
+ indentSize: item.indentSize,
1332
+ indexPath: item.indexPath
1333
+ });
1334
+ }
1335
+ if (item.type === "empty-subtree") {
1336
+ return renderVirtualEmptyRow(item._key);
1337
+ }
1338
+ const expandContent = renderExpandContent(item.record);
1339
+ if (!expandContent) {
1340
+ return null;
1341
+ }
1342
+ const scrollContainer = containerElement.value;
1343
+ return vue.createVNode(tableTr, {
1344
+ "key": `${item.record.key}-expand`,
1345
+ "expand": true
1346
+ }, {
1347
+ default: () => [vue.createVNode(tableTd, {
1348
+ "isFixedExpand": hasLeftFixedColumn.value || hasRightFixedColumn.value,
1349
+ "containerWidth": scrollContainer == null ? void 0 : scrollContainer.clientWidth,
1350
+ "colSpan": dataColumns.value.length + operations.value.length
1351
+ }, _isSlot(expandContent) ? expandContent : {
1352
+ default: () => [expandContent]
1353
+ })]
1354
+ });
1355
+ };
1220
1356
  const renderBody = () => {
1221
1357
  const hasSubData = flattenData.value.some((record) => Boolean(record.hasSubtree));
1222
1358
  return vue.createVNode(tableTbody, null, {
@@ -1245,7 +1381,7 @@ var _Table = vue.defineComponent({
1245
1381
  "rowSpan": groupColumns.value.length
1246
1382
  }, null);
1247
1383
  }), row.map((column, index3) => {
1248
- const resizable = props.columnResizable && Boolean(column.dataIndex) && index3 < row.length - 1;
1384
+ const resizable = props.columnResizable && Boolean(column.dataIndex) && index3 < row.length - 1 && !column.fixed;
1249
1385
  return vue.createVNode(tableTh, {
1250
1386
  "key": `th-${index3}`,
1251
1387
  "ref": (ins) => {
@@ -1308,14 +1444,11 @@ var _Table = vue.defineComponent({
1308
1444
  "onResize": handleTbodyResize
1309
1445
  }, {
1310
1446
  default: () => {
1311
- var _a2, _b2;
1447
+ var _a2, _b2, _c, _d;
1312
1448
  return [isVirtualList.value && flattenData.value.length ? vue.createVNode(virtualList, vue.mergeProps({
1313
- "ref": (ins) => {
1314
- if (ins == null ? void 0 : ins.$el)
1315
- tbodyRef.value = ins.$el;
1316
- },
1449
+ "ref": virtualComRef.value,
1317
1450
  "class": `${prefixCls}-body`,
1318
- "data": flattenData.value,
1451
+ "data": virtualListData.value,
1319
1452
  "itemKey": "_key",
1320
1453
  "component": {
1321
1454
  list: "table",
@@ -1326,19 +1459,18 @@ var _Table = vue.defineComponent({
1326
1459
  style: contentStyle.value
1327
1460
  },
1328
1461
  "paddingPosition": "list",
1329
- "height": "auto"
1462
+ "height": (_b2 = (_a2 = props.scroll) == null ? void 0 : _a2.y) != null ? _b2 : "auto"
1330
1463
  }, props.virtualListProps, {
1331
1464
  "onScroll": onTbodyScroll
1332
1465
  }), {
1333
1466
  item: ({
1334
- item,
1335
- index: index2
1336
- }) => renderRecord(item, index2)
1467
+ item
1468
+ }) => renderVirtualItem(item)
1337
1469
  }) : vue.createVNode(Component, vue.mergeProps({
1338
1470
  "ref": tbodyComRef,
1339
1471
  "class": `${prefixCls}-body`,
1340
1472
  "style": {
1341
- maxHeight: is.isNumber((_a2 = props.scroll) == null ? void 0 : _a2.y) ? `${(_b2 = props.scroll) == null ? void 0 : _b2.y}px` : "100%"
1473
+ maxHeight: is.isNumber((_c = props.scroll) == null ? void 0 : _c.y) ? `${(_d = props.scroll) == null ? void 0 : _d.y}px` : "100%"
1342
1474
  }
1343
1475
  }, scrollbar.value ? {
1344
1476
  outerStyle: {
@@ -261,11 +261,15 @@ const getLeafKeys = (record) => {
261
261
  const getSelectionStatus = (selectedRowKeys, leafKeys) => {
262
262
  let checked = false;
263
263
  let indeterminate = false;
264
- const selectedLeafKeys = leafKeys.filter(
265
- (key) => selectedRowKeys.includes(key)
266
- );
267
- if (selectedLeafKeys.length > 0) {
268
- if (selectedLeafKeys.length >= leafKeys.length) {
264
+ const selectedSet = selectedRowKeys instanceof Set ? selectedRowKeys : new Set(selectedRowKeys);
265
+ let selectedLeafCount = 0;
266
+ for (const key of leafKeys) {
267
+ if (selectedSet.has(key)) {
268
+ selectedLeafCount += 1;
269
+ }
270
+ }
271
+ if (selectedLeafCount > 0) {
272
+ if (selectedLeafCount >= leafKeys.length) {
269
273
  checked = true;
270
274
  } else {
271
275
  indeterminate = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geelato/web-vue",
3
- "version": "2.57.1",
3
+ "version": "2.58.1",
4
4
  "description": "Arco Design Vue 2.0: A Vue.js 3 UI Library",
5
5
  "keywords": [
6
6
  "arco",
@@ -29,6 +29,25 @@
29
29
  "lib/**/style/*",
30
30
  "*.less"
31
31
  ],
32
+ "scripts": {
33
+ "init": "pnpm run icongen && pnpm run lessgen && arco-vue-scripts build:component",
34
+ "start": "arco-vue-scripts dev:component",
35
+ "docgen": "arco-vue-scripts docgen",
36
+ "icongen": "arco-vue-scripts icongen && pnpm run dtsgen:icon",
37
+ "lessgen": "arco-vue-scripts lessgen",
38
+ "jsongen": "arco-vue-scripts jsongen",
39
+ "build": "pnpm run build:component && pnpm run build:style && pnpm run dtsgen && pnpm run jsongen",
40
+ "build:component": "arco-vue-scripts build:component -u",
41
+ "build:module": "arco-vue-scripts build:component",
42
+ "build:style": "arco-vue-scripts build:style",
43
+ "dtsgen": "arco-vue-scripts dtsgen 'components/**/*.{ts,tsx,vue}'",
44
+ "dtsgen:icon": "arco-vue-scripts dtsgen 'components/icon/**/*.{ts,tsx,vue}' -o 'components/icon/@types'",
45
+ "test": "arco-vue-scripts test --coverage",
46
+ "test:update": "arco-vue-scripts test --coverage -u",
47
+ "test:screenshot": "arco-vue-scripts test:screenshot -o ./__screenshots__/",
48
+ "changelog": "arco-vue-scripts changelog",
49
+ "lint-staged": "npx lint-staged"
50
+ },
32
51
  "peerDependencies": {
33
52
  "vue": ">=3.1.0"
34
53
  },
@@ -43,6 +62,7 @@
43
62
  ]
44
63
  },
45
64
  "devDependencies": {
65
+ "@arco-design/arco-vue-scripts": "workspace:*",
46
66
  "@babel/core": "^7.26.9",
47
67
  "@babel/plugin-proposal-class-properties": "^7.18.6",
48
68
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
@@ -69,8 +89,7 @@
69
89
  "stylelint-config-standard": "^20.0.0",
70
90
  "stylelint-order": "^4.1.0",
71
91
  "typescript": "^4.9.5",
72
- "vue-jest": "5.0.0-alpha.10",
73
- "@arco-design/arco-vue-scripts": "0.2.10"
92
+ "vue-jest": "5.0.0-alpha.10"
74
93
  },
75
94
  "dependencies": {
76
95
  "@arco-design/color": "^0.4.0",
@@ -87,27 +106,9 @@
87
106
  "tags": "json/vetur-tags.json",
88
107
  "attributes": "json/vetur-attributes.json"
89
108
  },
90
- "web-types": "json/web-types.json",
109
+ "web-types": "json/web-types.json"
110
+ ,
91
111
  "publishConfig": {
92
112
  "access": "public"
93
- },
94
- "scripts": {
95
- "init": "pnpm run icongen && pnpm run lessgen && arco-vue-scripts build:component",
96
- "start": "arco-vue-scripts dev:component",
97
- "docgen": "arco-vue-scripts docgen",
98
- "icongen": "arco-vue-scripts icongen && pnpm run dtsgen:icon",
99
- "lessgen": "arco-vue-scripts lessgen",
100
- "jsongen": "arco-vue-scripts jsongen",
101
- "build": "pnpm run build:component && pnpm run build:style && pnpm run dtsgen && pnpm run jsongen",
102
- "build:component": "arco-vue-scripts build:component -u",
103
- "build:module": "arco-vue-scripts build:component",
104
- "build:style": "arco-vue-scripts build:style",
105
- "dtsgen": "arco-vue-scripts dtsgen 'components/**/*.{ts,tsx,vue}'",
106
- "dtsgen:icon": "arco-vue-scripts dtsgen 'components/icon/**/*.{ts,tsx,vue}' -o 'components/icon/@types'",
107
- "test": "arco-vue-scripts test --coverage",
108
- "test:update": "arco-vue-scripts test --coverage -u",
109
- "test:screenshot": "arco-vue-scripts test:screenshot -o ./__screenshots__/",
110
- "changelog": "arco-vue-scripts changelog",
111
- "lint-staged": "npx lint-staged"
112
113
  }
113
- }
114
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2021 Bytedance, Inc. and its affiliates.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.