vxe-table 4.11.0-beta.11 → 4.11.0-beta.3

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 (57) hide show
  1. package/README.md +13 -18
  2. package/es/index.css +1 -1
  3. package/es/index.min.css +1 -1
  4. package/es/style.css +1 -1
  5. package/es/style.min.css +1 -1
  6. package/es/table/module/edit/hook.js +7 -1
  7. package/es/table/render/index.js +0 -10
  8. package/es/table/src/cell.js +0 -3
  9. package/es/table/src/header.js +2 -2
  10. package/es/table/src/table.js +25 -47
  11. package/es/table/style.css +1 -1
  12. package/es/table/style.min.css +1 -1
  13. package/es/ui/index.js +1 -1
  14. package/es/ui/src/log.js +1 -1
  15. package/es/vxe-table/style.css +1 -1
  16. package/es/vxe-table/style.min.css +1 -1
  17. package/lib/index.css +1 -1
  18. package/lib/index.min.css +1 -1
  19. package/lib/index.umd.js +38 -72
  20. package/lib/index.umd.min.js +1 -1
  21. package/lib/style.css +1 -1
  22. package/lib/style.min.css +1 -1
  23. package/lib/table/module/edit/hook.js +9 -1
  24. package/lib/table/module/edit/hook.min.js +1 -1
  25. package/lib/table/render/index.js +0 -10
  26. package/lib/table/render/index.min.js +1 -1
  27. package/lib/table/src/cell.js +0 -3
  28. package/lib/table/src/cell.min.js +1 -1
  29. package/lib/table/src/header.js +2 -2
  30. package/lib/table/src/header.min.js +1 -1
  31. package/lib/table/src/table.js +25 -54
  32. package/lib/table/src/table.min.js +1 -1
  33. package/lib/table/style/style.css +1 -1
  34. package/lib/table/style/style.min.css +1 -1
  35. package/lib/ui/index.js +1 -1
  36. package/lib/ui/index.min.js +1 -1
  37. package/lib/ui/src/log.js +1 -1
  38. package/lib/ui/src/log.min.js +1 -1
  39. package/lib/vxe-table/style/style.css +1 -1
  40. package/lib/vxe-table/style/style.min.css +1 -1
  41. package/package.json +2 -2
  42. package/packages/table/module/edit/hook.ts +7 -1
  43. package/packages/table/render/index.ts +0 -10
  44. package/packages/table/src/cell.ts +0 -3
  45. package/packages/table/src/header.ts +2 -2
  46. package/packages/table/src/table.ts +26 -51
  47. package/styles/components/table.scss +1 -1
  48. package/es/locale/lang/id-ID.js +0 -695
  49. package/lib/locale/lang/id-ID.js +0 -701
  50. package/lib/locale/lang/id-ID.min.js +0 -1
  51. package/packages/locale/lang/id-ID.ts +0 -695
  52. /package/es/{iconfont.1739840929802.ttf → iconfont.1739513039826.ttf} +0 -0
  53. /package/es/{iconfont.1739840929802.woff → iconfont.1739513039826.woff} +0 -0
  54. /package/es/{iconfont.1739840929802.woff2 → iconfont.1739513039826.woff2} +0 -0
  55. /package/lib/{iconfont.1739840929802.ttf → iconfont.1739513039826.ttf} +0 -0
  56. /package/lib/{iconfont.1739840929802.woff → iconfont.1739513039826.woff} +0 -0
  57. /package/lib/{iconfont.1739840929802.woff2 → iconfont.1739513039826.woff2} +0 -0
@@ -127,8 +127,8 @@ export default defineComponent({
127
127
  'is--sortable': column.sortable,
128
128
  'col--filter': !!filters,
129
129
  'is--filter-active': hasFilter,
130
- 'is--drag-active': columnOpts.drag && !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
131
- 'is--drag-disabled': columnOpts.drag && isDisabledDrag,
130
+ 'is--drag-active': !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
131
+ 'is--drag-disabled': isDisabledDrag,
132
132
  'col--current': currentColumn === column
133
133
  },
134
134
  headerClassName ? (XEUtils.isFunction(headerClassName) ? headerClassName(cellParams) : headerClassName) : '',
@@ -1142,7 +1142,6 @@ export default defineComponent({
1142
1142
  const fullColumnIdData = internalData.fullColumnIdData = {};
1143
1143
  const fullColumnFieldData = internalData.fullColumnFieldData = {};
1144
1144
  const mouseOpts = computeMouseOpts.value;
1145
- const expandOpts = computeExpandOpts.value;
1146
1145
  const columnOpts = computeColumnOpts.value;
1147
1146
  const columnDragOpts = computeColumnDragOpts.value;
1148
1147
  const { isCrossDrag, isSelfToChildDrag } = columnDragOpts;
@@ -1232,8 +1231,10 @@ export default defineComponent({
1232
1231
  else {
1233
1232
  tableFullColumn.forEach(handleFunc);
1234
1233
  }
1235
- if ((expandColumn && expandOpts.mode !== 'fixed') && mouseOpts.area) {
1236
- errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
1234
+ if (process.env.NODE_ENV === 'development') {
1235
+ if (expandColumn && mouseOpts.area) {
1236
+ errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
1237
+ }
1237
1238
  }
1238
1239
  if (process.env.NODE_ENV === 'development') {
1239
1240
  if (htmlColumn) {
@@ -1474,7 +1475,6 @@ export default defineComponent({
1474
1475
  };
1475
1476
  };
1476
1477
  const updateAfterListIndex = () => {
1477
- const { treeConfig } = props;
1478
1478
  const { afterFullData, fullDataRowIdData, fullAllDataRowIdData } = internalData;
1479
1479
  const fullMaps = {};
1480
1480
  afterFullData.forEach((row, index) => {
@@ -1482,9 +1482,7 @@ export default defineComponent({
1482
1482
  const rowRest = fullAllDataRowIdData[rowid];
1483
1483
  const seq = index + 1;
1484
1484
  if (rowRest) {
1485
- if (!treeConfig) {
1486
- rowRest.seq = seq;
1487
- }
1485
+ rowRest.seq = seq;
1488
1486
  rowRest._index = index;
1489
1487
  }
1490
1488
  else {
@@ -2474,10 +2472,7 @@ export default defineComponent({
2474
2472
  delete rExpandLazyLoadedMaps[rowid];
2475
2473
  }
2476
2474
  reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps;
2477
- nextTick()
2478
- .then(() => $xeTable.recalculate())
2479
- .then(() => $xeTable.updateCellAreas())
2480
- .then(() => resolve());
2475
+ nextTick().then(() => tableMethods.recalculate()).then(() => resolve());
2481
2476
  });
2482
2477
  }
2483
2478
  else {
@@ -2955,7 +2950,6 @@ export default defineComponent({
2955
2950
  });
2956
2951
  };
2957
2952
  const handleColumn = (collectColumn) => {
2958
- const expandOpts = computeExpandOpts.value;
2959
2953
  internalData.collectColumn = collectColumn;
2960
2954
  const tableFullColumn = getColumnList(collectColumn);
2961
2955
  internalData.tableFullColumn = tableFullColumn;
@@ -2963,7 +2957,6 @@ export default defineComponent({
2963
2957
  reactData.isDragColMove = false;
2964
2958
  initColumnSort();
2965
2959
  return Promise.resolve(restoreCustomStorage()).then(() => {
2966
- const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
2967
2960
  cacheColumnMap();
2968
2961
  parseColumns(true).then(() => {
2969
2962
  if (reactData.scrollXLoad) {
@@ -2973,9 +2966,11 @@ export default defineComponent({
2973
2966
  $xeTable.clearMergeCells();
2974
2967
  $xeTable.clearMergeFooterItems();
2975
2968
  $xeTable.handleTableData(true);
2976
- if ((scrollXLoad || scrollYLoad) && (expandColumn && expandOpts.mode !== 'fixed')) {
2977
- warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
2978
- }
2969
+ // if (process.env.NODE_ENV === 'development') {
2970
+ // if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
2971
+ // warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
2972
+ // }
2973
+ // }
2979
2974
  return nextTick().then(() => {
2980
2975
  if ($xeToolbar) {
2981
2976
  $xeToolbar.syncUpdate({
@@ -3347,14 +3342,6 @@ export default defineComponent({
3347
3342
  }
3348
3343
  }
3349
3344
  };
3350
- const handleRowExpandScroll = () => {
3351
- const { elemStore } = internalData;
3352
- const rowExpandEl = refRowExpandElem.value;
3353
- const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
3354
- if (rowExpandEl && bodyScrollElem) {
3355
- rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
3356
- }
3357
- };
3358
3345
  tableMethods = {
3359
3346
  dispatchEvent,
3360
3347
  /**
@@ -5089,14 +5076,14 @@ export default defineComponent({
5089
5076
  * @param {Boolean} expanded 是否展开
5090
5077
  */
5091
5078
  setRowExpand(rows, expanded) {
5092
- const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn } = reactData;
5079
+ const { rowExpandedMaps, rowExpandLazyLoadedMaps, expandColumn: column } = reactData;
5093
5080
  const { fullAllDataRowIdData } = internalData;
5094
5081
  let rExpandedMaps = Object.assign({}, rowExpandedMaps);
5095
5082
  const expandOpts = computeExpandOpts.value;
5096
5083
  const { reserve, lazy, accordion, toggleMethod } = expandOpts;
5097
5084
  const lazyRests = [];
5098
- const columnIndex = $xeTable.getColumnIndex(expandColumn);
5099
- const $columnIndex = $xeTable.getVMColumnIndex(expandColumn);
5085
+ const columnIndex = tableMethods.getColumnIndex(column);
5086
+ const $columnIndex = tableMethods.getVMColumnIndex(column);
5100
5087
  if (rows) {
5101
5088
  if (!XEUtils.isArray(rows)) {
5102
5089
  rows = [rows];
@@ -5106,7 +5093,7 @@ export default defineComponent({
5106
5093
  rExpandedMaps = {};
5107
5094
  rows = rows.slice(rows.length - 1, rows.length);
5108
5095
  }
5109
- const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column: expandColumn, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
5096
+ const validRows = toggleMethod ? rows.filter((row) => toggleMethod({ $table: $xeTable, expanded, column, columnIndex, $columnIndex, row, rowIndex: tableMethods.getRowIndex(row), $rowIndex: tableMethods.getVMRowIndex(row) })) : rows;
5110
5097
  if (expanded) {
5111
5098
  validRows.forEach((row) => {
5112
5099
  const rowid = getRowid($xeTable, row);
@@ -5135,15 +5122,7 @@ export default defineComponent({
5135
5122
  }
5136
5123
  }
5137
5124
  reactData.rowExpandedMaps = rExpandedMaps;
5138
- return Promise.all(lazyRests)
5139
- .then(() => $xeTable.recalculate())
5140
- .then(() => {
5141
- if (expandColumn) {
5142
- updateRowExpandStyle();
5143
- handleRowExpandScroll();
5144
- }
5145
- return $xeTable.updateCellAreas();
5146
- });
5125
+ return Promise.all(lazyRests).then(() => tableMethods.recalculate());
5147
5126
  },
5148
5127
  /**
5149
5128
  * 判断行是否为展开状态
@@ -5177,7 +5156,7 @@ export default defineComponent({
5177
5156
  if (expList.length) {
5178
5157
  tableMethods.recalculate();
5179
5158
  }
5180
- }).then(() => $xeTable.updateCellAreas());
5159
+ });
5181
5160
  },
5182
5161
  clearRowExpandReserve() {
5183
5162
  internalData.rowExpandedReserveRowMap = {};
@@ -5597,8 +5576,8 @@ export default defineComponent({
5597
5576
  updateCellAreas() {
5598
5577
  const { mouseConfig } = props;
5599
5578
  const mouseOpts = computeMouseOpts.value;
5600
- if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
5601
- return $xeTable.handleRecalculateCellAreaEvent();
5579
+ if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
5580
+ return $xeTable.handleRecalculateCellAreas();
5602
5581
  }
5603
5582
  return nextTick();
5604
5583
  },
@@ -7225,7 +7204,7 @@ export default defineComponent({
7225
7204
  const isSelected = sLen >= vLen;
7226
7205
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
7227
7206
  if (checkField) {
7228
- XEUtils.set(row, checkField, isSelected);
7207
+ XEUtils.get(row, checkField, isSelected);
7229
7208
  }
7230
7209
  if (isSelected) {
7231
7210
  if (!checkField) {
@@ -7298,7 +7277,7 @@ export default defineComponent({
7298
7277
  }
7299
7278
  vLen++;
7300
7279
  });
7301
- const isSelected = rootList.length > 0 ? (vLen > 0 ? (sLen >= vLen) : (sLen >= rootList.length)) : false;
7280
+ const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length;
7302
7281
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
7303
7282
  reactData.isAllSelected = isSelected;
7304
7283
  reactData.isIndeterminate = halfSelect;
@@ -9770,8 +9749,7 @@ export default defineComponent({
9770
9749
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
9771
9750
  }
9772
9751
  loadTableData(value, true).then(() => {
9773
- const { scrollXLoad, scrollYLoad, expandColumn } = reactData;
9774
- const expandOpts = computeExpandOpts.value;
9752
+ // const { scrollXLoad, scrollYLoad, expandColumn } = reactData
9775
9753
  internalData.inited = true;
9776
9754
  internalData.initStatus = true;
9777
9755
  if (!initStatus) {
@@ -9782,9 +9760,9 @@ export default defineComponent({
9782
9760
  // if (checkboxColumn && internalData.tableFullData.length > 300 && !checkboxOpts.checkField) {
9783
9761
  // warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
9784
9762
  // }
9785
- if ((scrollXLoad || scrollYLoad) && (expandColumn && expandOpts.mode !== 'fixed')) {
9786
- warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
9787
- }
9763
+ // if ((scrollXLoad || scrollYLoad) && expandColumn) {
9764
+ // warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
9765
+ // }
9788
9766
  return tableMethods.recalculate();
9789
9767
  });
9790
9768
  });
@@ -1940,7 +1940,7 @@
1940
1940
  display: none;
1941
1941
  position: absolute;
1942
1942
  pointer-events: none;
1943
- z-index: 6;
1943
+ z-index: 1;
1944
1944
  }
1945
1945
 
1946
1946
  .vxe-table--header-wrapper .vxe-table--cell-col-status-area {