vxe-table 3.13.0-beta.10 → 3.13.0-beta.2

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 (68) hide show
  1. package/es/index.css +1 -1
  2. package/es/index.min.css +1 -1
  3. package/es/style.css +1 -1
  4. package/es/style.min.css +1 -1
  5. package/es/table/module/edit/mixin.js +8 -1
  6. package/es/table/render/index.js +0 -10
  7. package/es/table/src/body.js +2 -4
  8. package/es/table/src/cell.js +0 -3
  9. package/es/table/src/footer.js +2 -4
  10. package/es/table/src/header.js +4 -6
  11. package/es/table/src/methods.js +19 -44
  12. package/es/table/src/table.js +3 -13
  13. package/es/table/style.css +1 -1
  14. package/es/table/style.min.css +1 -1
  15. package/es/ui/index.js +1 -1
  16. package/es/ui/src/log.js +1 -1
  17. package/es/vxe-table/style.css +1 -1
  18. package/es/vxe-table/style.min.css +1 -1
  19. package/lib/index.css +1 -1
  20. package/lib/index.min.css +1 -1
  21. package/lib/index.umd.js +39 -94
  22. package/lib/index.umd.min.js +1 -1
  23. package/lib/style.css +1 -1
  24. package/lib/style.min.css +1 -1
  25. package/lib/table/module/edit/mixin.js +10 -1
  26. package/lib/table/module/edit/mixin.min.js +1 -1
  27. package/lib/table/render/index.js +0 -10
  28. package/lib/table/render/index.min.js +1 -1
  29. package/lib/table/src/body.js +1 -4
  30. package/lib/table/src/body.min.js +1 -1
  31. package/lib/table/src/cell.js +0 -3
  32. package/lib/table/src/cell.min.js +1 -1
  33. package/lib/table/src/footer.js +1 -4
  34. package/lib/table/src/footer.min.js +1 -1
  35. package/lib/table/src/header.js +3 -6
  36. package/lib/table/src/header.min.js +1 -1
  37. package/lib/table/src/methods.js +19 -47
  38. package/lib/table/src/methods.min.js +1 -1
  39. package/lib/table/src/table.js +3 -17
  40. package/lib/table/src/table.min.js +1 -1
  41. package/lib/table/style/style.css +1 -1
  42. package/lib/table/style/style.min.css +1 -1
  43. package/lib/ui/index.js +1 -1
  44. package/lib/ui/index.min.js +1 -1
  45. package/lib/ui/src/log.js +1 -1
  46. package/lib/ui/src/log.min.js +1 -1
  47. package/lib/vxe-table/style/style.css +1 -1
  48. package/lib/vxe-table/style/style.min.css +1 -1
  49. package/package.json +2 -2
  50. package/packages/table/module/edit/mixin.ts +8 -1
  51. package/packages/table/render/index.ts +0 -10
  52. package/packages/table/src/body.ts +2 -5
  53. package/packages/table/src/cell.ts +1 -4
  54. package/packages/table/src/footer.ts +2 -5
  55. package/packages/table/src/header.ts +4 -7
  56. package/packages/table/src/methods.ts +21 -53
  57. package/packages/table/src/table.ts +3 -14
  58. package/styles/components/table.scss +1 -1
  59. package/es/locale/lang/id-ID.js +0 -695
  60. package/lib/locale/lang/id-ID.js +0 -701
  61. package/lib/locale/lang/id-ID.min.js +0 -1
  62. package/packages/locale/lang/id-ID.ts +0 -695
  63. /package/es/{iconfont.1739790201341.ttf → iconfont.1739506361723.ttf} +0 -0
  64. /package/es/{iconfont.1739790201341.woff → iconfont.1739506361723.woff} +0 -0
  65. /package/es/{iconfont.1739790201341.woff2 → iconfont.1739506361723.woff2} +0 -0
  66. /package/lib/{iconfont.1739790201341.ttf → iconfont.1739506361723.ttf} +0 -0
  67. /package/lib/{iconfont.1739790201341.woff → iconfont.1739506361723.woff} +0 -0
  68. /package/lib/{iconfont.1739790201341.woff2 → iconfont.1739506361723.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -2220,7 +2220,7 @@ function getClass(property, params) {
2220
2220
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
2221
2221
 
2222
2222
 
2223
- const version = "3.13.0-beta.10";
2223
+ const version = "3.13.0-beta.2";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2843,7 +2843,7 @@ function isNodeElement(elem) {
2843
2843
  const {
2844
2844
  log: log_log
2845
2845
  } = core_.VxeUI;
2846
- const log_version = `table v${"3.13.0-beta.10"}`;
2846
+ const log_version = `table v${"3.13.0-beta.2"}`;
2847
2847
  const warnLog = log_log.create('warn', log_version);
2848
2848
  const errLog = log_log.create('error', log_version);
2849
2849
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -4535,9 +4535,6 @@ const Cell = {
4535
4535
  'is--active': isActive
4536
4536
  }],
4537
4537
  on: {
4538
- mousedown(evnt) {
4539
- evnt.stopPropagation();
4540
- },
4541
4538
  click(evnt) {
4542
4539
  $table.triggerRowExpandEvent(evnt, params);
4543
4540
  }
@@ -5291,7 +5288,6 @@ function cacheColumnMap($xeTable) {
5291
5288
  const fullColumnIdData = internalData.fullColumnIdData = {};
5292
5289
  const fullColumnFieldData = internalData.fullColumnFieldData = {};
5293
5290
  const mouseOpts = $xeTable.computeMouseOpts;
5294
- const expandOpts = $xeTable.computeExpandOpts;
5295
5291
  const columnOpts = $xeTable.computeColumnOpts;
5296
5292
  const columnDragOpts = $xeTable.computeColumnDragOpts;
5297
5293
  const {
@@ -5397,8 +5393,10 @@ function cacheColumnMap($xeTable) {
5397
5393
  } else {
5398
5394
  tableFullColumn.forEach(handleFunc);
5399
5395
  }
5400
- if (expandColumn && expandOpts.mode !== 'fixed' && mouseOpts.area) {
5401
- errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
5396
+ if (true) {
5397
+ if (expandColumn && mouseOpts.area) {
5398
+ errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
5399
+ }
5402
5400
  }
5403
5401
  if (false) {}
5404
5402
  reactData.isGroup = isGroup;
@@ -6970,7 +6968,6 @@ function handleColumn($xeTable, collectColumn) {
6970
6968
  const $xeToolbar = $xeTable.$refs.$xeToolbar;
6971
6969
  const reactData = $xeTable;
6972
6970
  const internalData = $xeTable;
6973
- const expandOpts = $xeTable.computeExpandOpts;
6974
6971
  internalData.collectColumn = collectColumn;
6975
6972
  const tableFullColumn = getColumnList(collectColumn);
6976
6973
  internalData.tableFullColumn = tableFullColumn;
@@ -6978,11 +6975,6 @@ function handleColumn($xeTable, collectColumn) {
6978
6975
  reactData.isDragColMove = false;
6979
6976
  initColumnSort($xeTable);
6980
6977
  return Promise.resolve(restoreCustomStorage($xeTable)).then(() => {
6981
- const {
6982
- scrollXLoad,
6983
- scrollYLoad,
6984
- expandColumn
6985
- } = reactData;
6986
6978
  cacheColumnMap($xeTable);
6987
6979
  parseColumns($xeTable, true).then(() => {
6988
6980
  if (reactData.scrollXLoad) {
@@ -6992,8 +6984,10 @@ function handleColumn($xeTable, collectColumn) {
6992
6984
  $xeTable.clearMergeCells();
6993
6985
  $xeTable.clearMergeFooterItems();
6994
6986
  $xeTable.handleTableData(true);
6995
- if ((scrollXLoad || scrollYLoad) && expandColumn && expandOpts.mode !== 'fixed') {
6996
- warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
6987
+ if (true) {
6988
+ if ((reactData.scrollXLoad || reactData.scrollYLoad) && reactData.expandColumn) {
6989
+ warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
6990
+ }
6997
6991
  }
6998
6992
  return $xeTable.$nextTick().then(() => {
6999
6993
  if ($xeToolbar) {
@@ -7304,17 +7298,6 @@ function updateRowExpandStyle($xeTable) {
7304
7298
  }
7305
7299
  }
7306
7300
  }
7307
- function handleRowExpandScroll($xeTable) {
7308
- const internalData = $xeTable;
7309
- const {
7310
- elemStore
7311
- } = internalData;
7312
- const rowExpandEl = $xeTable.$refs.refRowExpandElem;
7313
- const bodyScrollElem = getRefElem(elemStore['main-body-scroll']);
7314
- if (rowExpandEl && bodyScrollElem) {
7315
- rowExpandEl.scrollTop = bodyScrollElem.scrollTop;
7316
- }
7317
- }
7318
7301
  const Methods = {
7319
7302
  callSlot(slotFunc, params, h, vNodes) {
7320
7303
  if (slotFunc) {
@@ -11486,7 +11469,7 @@ const Methods = {
11486
11469
  }
11487
11470
  vLen++;
11488
11471
  });
11489
- const isSelected = rootList.length > 0 ? vLen > 0 ? sLen >= vLen : sLen >= rootList.length : false;
11472
+ const isSelected = vLen > 0 ? sLen >= vLen : sLen >= rootList.length;
11490
11473
  const halfSelect = !isSelected && (sLen >= 1 || hLen >= 1);
11491
11474
  reactData.isAllSelected = isSelected;
11492
11475
  reactData.isIndeterminate = halfSelect;
@@ -13627,7 +13610,7 @@ const Methods = {
13627
13610
  delete rExpandLazyLoadedMaps[rowid];
13628
13611
  }
13629
13612
  reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps;
13630
- $xeTable.$nextTick().then(() => $xeTable.recalculate()).then(() => $xeTable.updateCellAreas()).then(() => resolve());
13613
+ $xeTable.$nextTick().then(() => $xeTable.recalculate()).then(() => resolve());
13631
13614
  });
13632
13615
  } else {
13633
13616
  resolve();
@@ -13642,13 +13625,12 @@ const Methods = {
13642
13625
  * @param {Boolean} expanded 是否展开
13643
13626
  */
13644
13627
  setRowExpand(rows, expanded) {
13645
- const $xeTable = this;
13646
13628
  const {
13647
13629
  rowExpandedMaps,
13648
13630
  fullAllDataRowIdData,
13649
13631
  rowExpandLazyLoadedMaps,
13650
13632
  expandOpts,
13651
- expandColumn
13633
+ expandColumn: column
13652
13634
  } = this;
13653
13635
  let rExpandedMaps = {
13654
13636
  ...rowExpandedMaps
@@ -13660,8 +13642,8 @@ const Methods = {
13660
13642
  toggleMethod
13661
13643
  } = expandOpts;
13662
13644
  const lazyRests = [];
13663
- const columnIndex = this.getColumnIndex(expandColumn);
13664
- const $columnIndex = this.getVMColumnIndex(expandColumn);
13645
+ const columnIndex = this.getColumnIndex(column);
13646
+ const $columnIndex = this.getVMColumnIndex(column);
13665
13647
  if (rows) {
13666
13648
  if (!external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rows)) {
13667
13649
  rows = [rows];
@@ -13673,7 +13655,7 @@ const Methods = {
13673
13655
  }
13674
13656
  const validRows = toggleMethod ? rows.filter(row => toggleMethod({
13675
13657
  expanded,
13676
- column: expandColumn,
13658
+ column,
13677
13659
  columnIndex,
13678
13660
  $columnIndex,
13679
13661
  row,
@@ -13706,13 +13688,7 @@ const Methods = {
13706
13688
  }
13707
13689
  }
13708
13690
  this.rowExpandedMaps = rExpandedMaps;
13709
- return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() => {
13710
- if (expandColumn) {
13711
- updateRowExpandStyle($xeTable);
13712
- handleRowExpandScroll($xeTable);
13713
- }
13714
- return $xeTable.updateCellAreas();
13715
- });
13691
+ return Promise.all(lazyRests).then(this.recalculate);
13716
13692
  },
13717
13693
  /**
13718
13694
  * 判断行是否为展开状态
@@ -13736,7 +13712,6 @@ const Methods = {
13736
13712
  * 手动清空展开行状态,数据会恢复成未展开的状态
13737
13713
  */
13738
13714
  clearRowExpand() {
13739
- const $xeTable = this;
13740
13715
  const {
13741
13716
  expandOpts,
13742
13717
  tableFullData
@@ -13753,7 +13728,7 @@ const Methods = {
13753
13728
  if (expList.length) {
13754
13729
  this.recalculate();
13755
13730
  }
13756
- }).then(() => $xeTable.updateCellAreas());
13731
+ });
13757
13732
  },
13758
13733
  clearRowExpandReserve() {
13759
13734
  this.rowExpandedReserveRowMap = {};
@@ -15252,16 +15227,10 @@ const Methods = {
15252
15227
  }
15253
15228
  },
15254
15229
  updateCellAreas() {
15255
- const $xeTable = this;
15256
- const props = $xeTable;
15257
- const {
15258
- mouseConfig
15259
- } = props;
15260
- const mouseOpts = $xeTable.computeMouseOpts;
15261
- if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
15262
- return $xeTable.handleRecalculateCellAreaEvent();
15230
+ if (this.mouseConfig && this.mouseOpts.area && this.handleRecalculateCellAreas) {
15231
+ return this.handleRecalculateCellAreas();
15263
15232
  }
15264
- return $xeTable.$nextTick();
15233
+ return this.$nextTick();
15265
15234
  },
15266
15235
  dispatchEvent(type, params, evnt) {
15267
15236
  const $xeTable = this;
@@ -16090,7 +16059,6 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
16090
16059
  tableData,
16091
16060
  isRowLoading,
16092
16061
  isColLoading,
16093
- overflowX,
16094
16062
  scrollXLoad,
16095
16063
  scrollYLoad,
16096
16064
  isAllOverflow,
@@ -16120,10 +16088,8 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
16120
16088
  isOptimizeMode = true;
16121
16089
  }
16122
16090
  }
16123
- if (fixedType || !overflowX) {
16124
- renderColumnList = visibleColumn;
16125
- }
16126
16091
  if (fixedType) {
16092
+ renderColumnList = visibleColumn;
16127
16093
  if (isOptimizeMode) {
16128
16094
  renderColumnList = fixedColumn || [];
16129
16095
  }
@@ -16440,8 +16406,8 @@ const header_renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) =>
16440
16406
  'is--sortable': column.sortable,
16441
16407
  'col--filter': !!filters,
16442
16408
  'is--filter-active': hasFilter,
16443
- 'is--drag-active': columnOpts.drag && !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
16444
- 'is--drag-disabled': columnOpts.drag && isDisabledDrag,
16409
+ 'is--drag-active': !column.fixed && !isDisabledDrag && (isCrossDrag || isPeerDrag || !column.parentId),
16410
+ 'is--drag-disabled': isDisabledDrag,
16445
16411
  'col--current': currentColumn === column
16446
16412
  }, getClass(headerClassName, cellParams), getClass(headerCellClassName, cellParams)],
16447
16413
  attrs: thAttrs,
@@ -16607,7 +16573,6 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
16607
16573
  } = tableProps;
16608
16574
  const {
16609
16575
  isGroup,
16610
- overflowX,
16611
16576
  scrollXLoad,
16612
16577
  scrollYLoad,
16613
16578
  dragCol
@@ -16631,10 +16596,8 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
16631
16596
  isOptimizeMode = true;
16632
16597
  }
16633
16598
  }
16634
- if (fixedType || !overflowX) {
16635
- renderColumnList = visibleColumn;
16636
- }
16637
16599
  if (fixedType) {
16600
+ renderColumnList = visibleColumn;
16638
16601
  // 如果是使用优化模式
16639
16602
  if (isOptimizeMode) {
16640
16603
  renderColumnList = fixedColumn || [];
@@ -17107,7 +17070,6 @@ function footer_renderHeads(h, _vm, renderColumnList) {
17107
17070
  } = tableInternalData;
17108
17071
  const {
17109
17072
  isGroup,
17110
- overflowX,
17111
17073
  scrollXLoad,
17112
17074
  scrollYLoad,
17113
17075
  dragCol
@@ -17122,10 +17084,8 @@ function footer_renderHeads(h, _vm, renderColumnList) {
17122
17084
  isOptimizeMode = true;
17123
17085
  }
17124
17086
  }
17125
- if (fixedType || !overflowX) {
17126
- renderColumnList = visibleColumn;
17127
- }
17128
17087
  if (fixedType) {
17088
+ renderColumnList = visibleColumn;
17129
17089
  if (isOptimizeMode) {
17130
17090
  renderColumnList = fixedColumn || [];
17131
17091
  }
@@ -20897,7 +20857,11 @@ function handleInsertChildRowAt($xeTable, records, parentRow, targetRow, isInser
20897
20857
  });
20898
20858
  }
20899
20859
  function handleClearEdit($xeTable, evnt, targetRow) {
20860
+ const props = $xeTable;
20900
20861
  const reactData = $xeTable;
20862
+ const {
20863
+ mouseConfig
20864
+ } = props;
20901
20865
  const {
20902
20866
  editStore
20903
20867
  } = reactData;
@@ -20910,6 +20874,7 @@ function handleClearEdit($xeTable, evnt, targetRow) {
20910
20874
  column
20911
20875
  } = actived;
20912
20876
  const validOpts = $xeTable.computeValidOpts;
20877
+ const mouseOpts = $xeTable.computeMouseOpts;
20913
20878
  if (row || column) {
20914
20879
  if (targetRow && getRowid($xeTable, targetRow) !== getRowid($xeTable, row)) {
20915
20880
  return $xeTable.$nextTick();
@@ -20937,7 +20902,11 @@ function handleClearEdit($xeTable, evnt, targetRow) {
20937
20902
  }
20938
20903
  }
20939
20904
  }
20940
- return $xeTable.$nextTick().then(() => $xeTable.updateCellAreas());
20905
+ return $xeTable.$nextTick().then(() => {
20906
+ if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
20907
+ return $xeTable.handleRecalculateCellAreas();
20908
+ }
20909
+ });
20941
20910
  }
20942
20911
  function handleEditActive($xeTable, params, evnt, isFocus) {
20943
20912
  const props = $xeTable;
@@ -26239,8 +26208,6 @@ function renderBody(h, $xeTable) {
26239
26208
  },
26240
26209
  watch: {
26241
26210
  data(value) {
26242
- const $xeTable = this;
26243
- const reactData = $xeTable;
26244
26211
  const {
26245
26212
  initStatus
26246
26213
  } = this;
@@ -26248,12 +26215,6 @@ function renderBody(h, $xeTable) {
26248
26215
  warnLog('vxe.error.errLargeData', ['loadData(data), reloadData(data)']);
26249
26216
  }
26250
26217
  this.loadTableData(value || [], true).then(() => {
26251
- const {
26252
- scrollXLoad,
26253
- scrollYLoad,
26254
- expandColumn
26255
- } = reactData;
26256
- const expandOpts = $xeTable.computeExpandOpts;
26257
26218
  this.inited = true;
26258
26219
  this.initStatus = true;
26259
26220
  if (!initStatus) {
@@ -26263,9 +26224,9 @@ function renderBody(h, $xeTable) {
26263
26224
  // if (checkboxColumn && this.tableFullData.length > 300 && !this.checkboxOpts.checkField) {
26264
26225
  // warnLog('vxe.error.checkProp', ['checkbox-config.checkField'])
26265
26226
  // }
26266
- if ((scrollXLoad || scrollYLoad) && expandColumn && expandOpts.mode !== 'fixed') {
26267
- warnLog('vxe.error.scrollErrProp', ['column.type=expand']);
26268
- }
26227
+ // if ((this.scrollXLoad || this.scrollYLoad) && this.expandColumn) {
26228
+ // warnLog('vxe.error.scrollErrProp', ['column.type=expand'])
26229
+ // }
26269
26230
  this.recalculate();
26270
26231
  });
26271
26232
  },
@@ -26290,12 +26251,6 @@ function renderBody(h, $xeTable) {
26290
26251
  showFooter() {
26291
26252
  this.reScrollFlag++;
26292
26253
  },
26293
- overflowX() {
26294
- this.reScrollFlag++;
26295
- },
26296
- overflowY() {
26297
- this.reScrollFlag++;
26298
- },
26299
26254
  reScrollFlag() {
26300
26255
  const $xeTable = this;
26301
26256
  $xeTable.$nextTick(() => {
@@ -30311,11 +30266,6 @@ render_renderer.mixin({
30311
30266
  tableFilterDefaultMethod: handleFilterMethod,
30312
30267
  tableExportMethod: handleExportSelectMethod
30313
30268
  },
30314
- formatOption: {
30315
- renderTableDefault(h, renderOpts, params) {
30316
- return getCellLabelVNs(h, renderOpts, params, getSelectCellValue(renderOpts, params));
30317
- }
30318
- },
30319
30269
  VxeTreeSelect: {
30320
30270
  tableAutoFocus: 'input',
30321
30271
  renderTableEdit: defaultTableOrTreeSelectEditRender,
@@ -30332,11 +30282,6 @@ render_renderer.mixin({
30332
30282
  },
30333
30283
  tableExportMethod: handleExportTreeSelectMethod
30334
30284
  },
30335
- formatTree: {
30336
- renderTableDefault(h, renderOpts, params) {
30337
- return getCellLabelVNs(h, renderOpts, params, getTreeSelectCellValue(renderOpts, params));
30338
- }
30339
- },
30340
30285
  VxeColorPicker: {
30341
30286
  tableAutoFocus: 'input',
30342
30287
  renderTableEdit(h, renderOpts, params) {