vxe-table 4.11.0-beta.2 → 4.11.0-beta.4

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 +18 -13
  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 +1 -7
  7. package/es/table/src/body.js +4 -2
  8. package/es/table/src/cell.js +3 -0
  9. package/es/table/src/footer.js +4 -2
  10. package/es/table/src/header.js +4 -2
  11. package/es/table/src/table.js +24 -13
  12. package/es/table/style.css +1 -1
  13. package/es/table/style.min.css +1 -1
  14. package/es/ui/index.js +1 -1
  15. package/es/ui/src/log.js +1 -1
  16. package/es/vxe-table/style.css +1 -1
  17. package/es/vxe-table/style.min.css +1 -1
  18. package/lib/index.css +1 -1
  19. package/lib/index.min.css +1 -1
  20. package/lib/index.umd.js +38 -27
  21. package/lib/index.umd.min.js +1 -1
  22. package/lib/style.css +1 -1
  23. package/lib/style.min.css +1 -1
  24. package/lib/table/module/edit/hook.js +1 -9
  25. package/lib/table/module/edit/hook.min.js +1 -1
  26. package/lib/table/src/body.js +4 -1
  27. package/lib/table/src/body.min.js +1 -1
  28. package/lib/table/src/cell.js +3 -0
  29. package/lib/table/src/cell.min.js +1 -1
  30. package/lib/table/src/footer.js +4 -1
  31. package/lib/table/src/footer.min.js +1 -1
  32. package/lib/table/src/header.js +4 -1
  33. package/lib/table/src/header.min.js +1 -1
  34. package/lib/table/src/table.js +20 -13
  35. package/lib/table/src/table.min.js +1 -1
  36. package/lib/table/style/style.css +1 -1
  37. package/lib/table/style/style.min.css +1 -1
  38. package/lib/ui/index.js +1 -1
  39. package/lib/ui/index.min.js +1 -1
  40. package/lib/ui/src/log.js +1 -1
  41. package/lib/ui/src/log.min.js +1 -1
  42. package/lib/vxe-table/style/style.css +1 -1
  43. package/lib/vxe-table/style/style.min.css +1 -1
  44. package/package.json +1 -1
  45. package/packages/table/module/edit/hook.ts +1 -7
  46. package/packages/table/src/body.ts +5 -2
  47. package/packages/table/src/cell.ts +3 -0
  48. package/packages/table/src/footer.ts +5 -2
  49. package/packages/table/src/header.ts +5 -2
  50. package/packages/table/src/table.ts +25 -14
  51. package/styles/components/table.scss +1 -1
  52. /package/es/{iconfont.1739506388714.ttf → iconfont.1739527666244.ttf} +0 -0
  53. /package/es/{iconfont.1739506388714.woff → iconfont.1739527666244.woff} +0 -0
  54. /package/es/{iconfont.1739506388714.woff2 → iconfont.1739527666244.woff2} +0 -0
  55. /package/lib/{iconfont.1739506388714.ttf → iconfont.1739527666244.ttf} +0 -0
  56. /package/lib/{iconfont.1739506388714.woff → iconfont.1739527666244.woff} +0 -0
  57. /package/lib/{iconfont.1739506388714.woff2 → iconfont.1739527666244.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -3138,7 +3138,7 @@ function eqEmptyValue(cellValue) {
3138
3138
  ;// ./packages/ui/index.ts
3139
3139
 
3140
3140
 
3141
- const version = "4.11.0-beta.2";
3141
+ const version = "4.11.0-beta.4";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3586,7 +3586,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3586
3586
  const {
3587
3587
  log: log_log
3588
3588
  } = core_.VxeUI;
3589
- const log_version = `table v${"4.11.0-beta.2"}`;
3589
+ const log_version = `table v${"4.11.0-beta.4"}`;
3590
3590
  const warnLog = log_log.create('warn', log_version);
3591
3591
  const errLog = log_log.create('error', log_version);
3592
3592
  ;// ./packages/table/src/columnInfo.ts
@@ -5612,6 +5612,9 @@ const Cell = {
5612
5612
  class: ['vxe-table--expanded', {
5613
5613
  'is--active': isActive
5614
5614
  }],
5615
+ onMousedown(evnt) {
5616
+ evnt.stopPropagation();
5617
+ },
5615
5618
  onClick(evnt) {
5616
5619
  $table.triggerRowExpandEvent(evnt, params);
5617
5620
  }
@@ -6882,6 +6885,7 @@ const renderType = 'body';
6882
6885
  tableData,
6883
6886
  isRowLoading,
6884
6887
  isColLoading,
6888
+ overflowX,
6885
6889
  scrollXLoad,
6886
6890
  scrollYLoad,
6887
6891
  isAllOverflow,
@@ -6911,8 +6915,10 @@ const renderType = 'body';
6911
6915
  isOptimizeMode = true;
6912
6916
  }
6913
6917
  }
6914
- if (fixedType) {
6918
+ if (fixedType || !overflowX) {
6915
6919
  renderColumnList = visibleColumn;
6920
+ }
6921
+ if (fixedType) {
6916
6922
  if (isOptimizeMode) {
6917
6923
  renderColumnList = fixedColumn || [];
6918
6924
  }
@@ -7346,6 +7352,7 @@ const header_renderType = 'header';
7346
7352
  } = tableProps;
7347
7353
  const {
7348
7354
  isGroup,
7355
+ overflowX,
7349
7356
  scrollXLoad,
7350
7357
  scrollYLoad,
7351
7358
  dragCol
@@ -7369,8 +7376,10 @@ const header_renderType = 'header';
7369
7376
  isOptimizeMode = true;
7370
7377
  }
7371
7378
  }
7372
- if (fixedType) {
7379
+ if (fixedType || !overflowX) {
7373
7380
  renderColumnList = visibleColumn;
7381
+ }
7382
+ if (fixedType) {
7374
7383
  // 如果是使用优化模式
7375
7384
  if (isOptimizeMode) {
7376
7385
  renderColumnList = fixedColumn || [];
@@ -7838,6 +7847,7 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
7838
7847
  } = tableInternalData;
7839
7848
  const {
7840
7849
  isGroup,
7850
+ overflowX,
7841
7851
  scrollXLoad,
7842
7852
  scrollYLoad,
7843
7853
  dragCol
@@ -7852,8 +7862,10 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
7852
7862
  isOptimizeMode = true;
7853
7863
  }
7854
7864
  }
7855
- if (fixedType) {
7865
+ if (fixedType || !overflowX) {
7856
7866
  renderColumnList = visibleColumn;
7867
+ }
7868
+ if (fixedType) {
7857
7869
  if (isOptimizeMode) {
7858
7870
  renderColumnList = fixedColumn || [];
7859
7871
  }
@@ -11588,7 +11600,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
11588
11600
  } = internalData;
11589
11601
  const fullColumnIdData = internalData.fullColumnIdData = {};
11590
11602
  const fullColumnFieldData = internalData.fullColumnFieldData = {};
11591
- const mouseOpts = computeMouseOpts.value;
11603
+ // const mouseOpts = computeMouseOpts.value
11592
11604
  const columnOpts = computeColumnOpts.value;
11593
11605
  const columnDragOpts = computeColumnDragOpts.value;
11594
11606
  const {
@@ -11694,11 +11706,11 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
11694
11706
  } else {
11695
11707
  tableFullColumn.forEach(handleFunc);
11696
11708
  }
11697
- if (true) {
11698
- if (expandColumn && mouseOpts.area) {
11699
- errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand']);
11700
- }
11701
- }
11709
+ // if (process.env.VUE_APP_VXE_ENV === 'development') {
11710
+ // if (expandColumn && mouseOpts.area) {
11711
+ // errLog('vxe.error.errConflicts', ['mouse-config.area', 'column.type=expand'])
11712
+ // }
11713
+ // }
11702
11714
  if (true) {
11703
11715
  if (htmlColumn) {
11704
11716
  if (!columnOpts.useKey) {
@@ -13214,7 +13226,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
13214
13226
  delete rExpandLazyLoadedMaps[rowid];
13215
13227
  }
13216
13228
  reactData.rowExpandLazyLoadedMaps = rExpandLazyLoadedMaps;
13217
- (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => tableMethods.recalculate()).then(() => resolve());
13229
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => $xeTable.recalculate()).then(() => $xeTable.updateCellAreas()).then(() => resolve());
13218
13230
  });
13219
13231
  } else {
13220
13232
  resolve();
@@ -16258,7 +16270,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16258
16270
  }
16259
16271
  }
16260
16272
  reactData.rowExpandedMaps = rExpandedMaps;
16261
- return Promise.all(lazyRests).then(() => tableMethods.recalculate());
16273
+ return Promise.all(lazyRests).then(() => $xeTable.recalculate()).then(() => $xeTable.updateCellAreas());
16262
16274
  },
16263
16275
  /**
16264
16276
  * 判断行是否为展开状态
@@ -16298,7 +16310,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16298
16310
  if (expList.length) {
16299
16311
  tableMethods.recalculate();
16300
16312
  }
16301
- });
16313
+ }).then(() => $xeTable.updateCellAreas());
16302
16314
  },
16303
16315
  clearRowExpandReserve() {
16304
16316
  internalData.rowExpandedReserveRowMap = {};
@@ -16779,8 +16791,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16779
16791
  mouseConfig
16780
16792
  } = props;
16781
16793
  const mouseOpts = computeMouseOpts.value;
16782
- if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
16783
- return $xeTable.handleRecalculateCellAreas();
16794
+ if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreaEvent) {
16795
+ return $xeTable.handleRecalculateCellAreaEvent();
16784
16796
  }
16785
16797
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
16786
16798
  },
@@ -20688,7 +20700,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
20688
20700
  updateScrollXSpace() {
20689
20701
  const {
20690
20702
  isGroup,
20691
- scrollXLoad
20703
+ scrollXLoad,
20704
+ overflowX
20692
20705
  } = reactData;
20693
20706
  const {
20694
20707
  visibleColumn,
@@ -20708,7 +20721,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
20708
20721
  const footerElem = tableFooterElem ? tableFooterElem.querySelector('.vxe-table--footer') : null;
20709
20722
  const leftSpaceWidth = visibleColumn.slice(0, scrollXStore.startIndex).reduce((previous, column) => previous + column.renderWidth, 0);
20710
20723
  let marginLeft = '';
20711
- if (scrollXLoad) {
20724
+ if (scrollXLoad && overflowX) {
20712
20725
  marginLeft = `${leftSpaceWidth}px`;
20713
20726
  }
20714
20727
  if (headerElem) {
@@ -21582,6 +21595,12 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
21582
21595
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => props.showFooter, () => {
21583
21596
  reScrollFlag.value++;
21584
21597
  });
21598
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => reactData.overflowX, () => {
21599
+ reScrollFlag.value++;
21600
+ });
21601
+ (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(() => reactData.overflowY, () => {
21602
+ reScrollFlag.value++;
21603
+ });
21585
21604
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.watch)(reScrollFlag, () => {
21586
21605
  (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)(() => {
21587
21606
  tableMethods.recalculate(true).then(() => tableMethods.refreshScroll());
@@ -23262,9 +23281,6 @@ edit_hook_hooks.add('tableEditModule', {
23262
23281
  });
23263
23282
  };
23264
23283
  const handleClearEdit = (evnt, targetRow) => {
23265
- const {
23266
- mouseConfig
23267
- } = props;
23268
23284
  const {
23269
23285
  editStore
23270
23286
  } = reactData;
@@ -23277,7 +23293,6 @@ edit_hook_hooks.add('tableEditModule', {
23277
23293
  column
23278
23294
  } = actived;
23279
23295
  const validOpts = computeValidOpts.value;
23280
- const mouseOpts = computeMouseOpts.value;
23281
23296
  if (row || column) {
23282
23297
  if (targetRow && getRowid($xeTable, targetRow) !== getRowid($xeTable, row)) {
23283
23298
  return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)();
@@ -23305,11 +23320,7 @@ edit_hook_hooks.add('tableEditModule', {
23305
23320
  }
23306
23321
  }
23307
23322
  }
23308
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => {
23309
- if (mouseConfig && mouseOpts.area && $xeTable.handleRecalculateCellAreas) {
23310
- return $xeTable.handleRecalculateCellAreas();
23311
- }
23312
- });
23323
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.nextTick)().then(() => $xeTable.updateCellAreas());
23313
23324
  };
23314
23325
  const handleEditActive = (params, evnt, isFocus) => {
23315
23326
  const {