vxe-table 4.9.8 → 4.9.10

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 (59) 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/hook.js +16 -4
  6. package/es/table/module/export/import-panel.js +1 -1
  7. package/es/table/src/body.js +9 -6
  8. package/es/table/src/columnInfo.js +1 -1
  9. package/es/table/src/footer.js +7 -1
  10. package/es/table/src/table.js +13 -5
  11. package/es/table/src/util.js +0 -10
  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 +74 -32
  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 +38 -4
  25. package/lib/table/module/edit/hook.min.js +1 -1
  26. package/lib/table/module/export/import-panel.js +1 -1
  27. package/lib/table/module/export/import-panel.min.js +1 -1
  28. package/lib/table/src/body.js +9 -6
  29. package/lib/table/src/body.min.js +1 -1
  30. package/lib/table/src/columnInfo.js +3 -3
  31. package/lib/table/src/columnInfo.min.js +1 -1
  32. package/lib/table/src/footer.js +7 -1
  33. package/lib/table/src/footer.min.js +1 -1
  34. package/lib/table/src/table.js +14 -5
  35. package/lib/table/src/table.min.js +1 -1
  36. package/lib/table/src/util.js +0 -10
  37. package/lib/table/style/style.css +1 -1
  38. package/lib/table/style/style.min.css +1 -1
  39. package/lib/ui/index.js +1 -1
  40. package/lib/ui/index.min.js +1 -1
  41. package/lib/ui/src/log.js +1 -1
  42. package/lib/ui/src/log.min.js +1 -1
  43. package/lib/vxe-table/style/style.css +1 -1
  44. package/lib/vxe-table/style/style.min.css +1 -1
  45. package/package.json +2 -2
  46. package/packages/table/module/edit/hook.ts +16 -4
  47. package/packages/table/module/export/import-panel.ts +1 -1
  48. package/packages/table/src/body.ts +14 -11
  49. package/packages/table/src/columnInfo.ts +1 -1
  50. package/packages/table/src/footer.ts +7 -1
  51. package/packages/table/src/table.ts +18 -8
  52. package/packages/table/src/util.ts +0 -16
  53. package/styles/components/table.scss +1 -1
  54. /package/es/{iconfont.1732522568827.ttf → iconfont.1732797516206.ttf} +0 -0
  55. /package/es/{iconfont.1732522568827.woff → iconfont.1732797516206.woff} +0 -0
  56. /package/es/{iconfont.1732522568827.woff2 → iconfont.1732797516206.woff2} +0 -0
  57. /package/lib/{iconfont.1732522568827.ttf → iconfont.1732797516206.ttf} +0 -0
  58. /package/lib/{iconfont.1732522568827.woff → iconfont.1732797516206.woff} +0 -0
  59. /package/lib/{iconfont.1732522568827.woff2 → iconfont.1732797516206.woff2} +0 -0
package/lib/index.umd.js CHANGED
@@ -1998,7 +1998,7 @@ function eqEmptyValue(cellValue) {
1998
1998
  ;// CONCATENATED MODULE: ./packages/ui/index.ts
1999
1999
 
2000
2000
 
2001
- const version = "4.9.8";
2001
+ const version = "4.9.10";
2002
2002
  core_.VxeUI.version = version;
2003
2003
  core_.VxeUI.tableVersion = version;
2004
2004
  core_.VxeUI.setConfig({
@@ -2394,7 +2394,7 @@ var es_array_push = __webpack_require__(4114);
2394
2394
  const {
2395
2395
  log: log_log
2396
2396
  } = core_.VxeUI;
2397
- const log_version = `table v${"4.9.8"}`;
2397
+ const log_version = `table v${"4.9.10"}`;
2398
2398
  const warnLog = log_log.create('warn', log_version);
2399
2399
  const errLog = log_log.create('error', log_version);
2400
2400
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -2418,6 +2418,9 @@ class ColumnInfo {
2418
2418
  const $xeGrid = $xeTable.xegrid;
2419
2419
  const formatter = _vm.formatter;
2420
2420
  const visible = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(_vm.visible) ? _vm.visible : true;
2421
+ const {
2422
+ props: tableProps
2423
+ } = $xeTable;
2421
2424
  if (true) {
2422
2425
  const types = ['seq', 'checkbox', 'radio', 'expand', 'html'];
2423
2426
  if (_vm.type && types.indexOf(_vm.type) === -1) {
@@ -2433,9 +2436,6 @@ class ColumnInfo {
2433
2436
  warnLog('vxe.error.errConflicts', ['column.cell-render', 'column.edit-render']);
2434
2437
  }
2435
2438
  if (_vm.type === 'expand') {
2436
- const {
2437
- props: tableProps
2438
- } = $xeTable;
2439
2439
  const {
2440
2440
  treeConfig
2441
2441
  } = tableProps;
@@ -2816,16 +2816,6 @@ function restoreScrollLocation($xeTable, scrollLeft, scrollTop) {
2816
2816
  }
2817
2817
  });
2818
2818
  }
2819
- // export function removeScrollListener (scrollElem: XEBodyScrollElement | null) {
2820
- // if (scrollElem && scrollElem._onscroll) {
2821
- // scrollElem.onscroll = null
2822
- // }
2823
- // }
2824
- // export function restoreScrollListener (scrollElem: XEBodyScrollElement | null) {
2825
- // if (scrollElem && scrollElem._onscroll) {
2826
- // scrollElem.onscroll = scrollElem._onscroll
2827
- // }
2828
- // }
2829
2819
  /**
2830
2820
  * 生成行的唯一主键
2831
2821
  */
@@ -5312,12 +5302,6 @@ const lineOffsetSizes = {
5312
5302
  $xeTable.clearHoverRow();
5313
5303
  };
5314
5304
  }
5315
- // 拖拽行事件
5316
- if (rowOpts.drag) {
5317
- trOn.onDragstart = $xeTable.handleRowDragDragstartEvent;
5318
- trOn.onDragend = $xeTable.handleRowDragDragendEvent;
5319
- trOn.onDragover = $xeTable.handleRowDragDragoverEvent;
5320
- }
5321
5305
  const rowid = getRowid($xeTable, row);
5322
5306
  const rest = fullAllDataRowIdData[rowid];
5323
5307
  let rowLevel = 0;
@@ -5354,6 +5338,12 @@ const lineOffsetSizes = {
5354
5338
  rowChildren = row[childrenField];
5355
5339
  isExpandTree = rowChildren && rowChildren.length > 0 && !!treeExpandedMaps[rowid];
5356
5340
  }
5341
+ // 拖拽行事件
5342
+ if (rowOpts.drag && !rowLevel) {
5343
+ trOn.onDragstart = $xeTable.handleRowDragDragstartEvent;
5344
+ trOn.onDragend = $xeTable.handleRowDragDragendEvent;
5345
+ trOn.onDragover = $xeTable.handleRowDragDragoverEvent;
5346
+ }
5357
5347
  const trClass = ['vxe-body--row', treeConfig ? `row--level-${rowLevel}` : '', {
5358
5348
  'row--stripe': stripe && ($xeTable.getVTRowIndex(row) + 1) % 2 === 0,
5359
5349
  'is--new': isNewRow,
@@ -5480,6 +5470,9 @@ const lineOffsetSizes = {
5480
5470
  const headerElem = tableHeader ? tableHeader.$el : null;
5481
5471
  const footerElem = tableFooter ? tableFooter.$el : null;
5482
5472
  const bodyElem = tableBody.$el;
5473
+ if (!bodyElem) {
5474
+ return;
5475
+ }
5483
5476
  const leftElem = leftBody ? leftBody.$el : null;
5484
5477
  const rightElem = rightBody ? rightBody.$el : null;
5485
5478
  const xHandleEl = refScrollXHandleElem.value;
@@ -6341,7 +6334,13 @@ function mergeFooterMethod(mergeFooterList, _rowIndex, _columnIndex) {
6341
6334
  const tableBody = refTableBody.value;
6342
6335
  const headerElem = tableHeader ? tableHeader.$el : null;
6343
6336
  const footerElem = refElem.value;
6344
- const bodyElem = tableBody.$el;
6337
+ if (!footerElem) {
6338
+ return;
6339
+ }
6340
+ const bodyElem = tableBody ? tableBody.$el : null;
6341
+ if (!bodyElem) {
6342
+ return;
6343
+ }
6345
6344
  const xHandleEl = refScrollXHandleElem.value;
6346
6345
  const scrollLeft = footerElem.scrollLeft;
6347
6346
  const isRollX = true;
@@ -8128,7 +8127,7 @@ const {
8128
8127
  onClick: cancelEvent
8129
8128
  }) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)(), VxeUIButtonComponent ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)(VxeUIButtonComponent, {
8130
8129
  status: 'primary',
8131
- disabled: !hasFile,
8130
+ disabled: !hasFile || reactData.loading,
8132
8131
  content: import_panel_getI18n('vxe.import.impConfirm'),
8133
8132
  onClick: importEvent
8134
8133
  }) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)()])]);
@@ -11533,7 +11532,8 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
11533
11532
  const loadTableData = datas => {
11534
11533
  const {
11535
11534
  keepSource,
11536
- treeConfig
11535
+ treeConfig,
11536
+ showOverflow
11537
11537
  } = props;
11538
11538
  const {
11539
11539
  editStore,
@@ -11609,8 +11609,14 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
11609
11609
  if (keepSource) {
11610
11610
  tablePrivateMethods.cacheSourceMap(fullData);
11611
11611
  }
11612
- if (true) {
11613
- if (sYLoad) {
11612
+ if (sYLoad) {
11613
+ if (showOverflow) {
11614
+ const errColumn = internalData.tableFullColumn.find(column => column.showOverflow === false);
11615
+ if (errColumn) {
11616
+ errLog('vxe.error.errProp', [`column[field="${errColumn.field}"].show-overflow=false`, 'show-overflow=true']);
11617
+ }
11618
+ }
11619
+ if (true) {
11614
11620
  if (!(props.height || props.maxHeight)) {
11615
11621
  errLog('vxe.error.reqProp', ['table.height | table.max-height | table.scroll-y={enabled: false}']);
11616
11622
  }
@@ -12801,7 +12807,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
12801
12807
  editStore
12802
12808
  } = reactData;
12803
12809
  const rowid = getRowid($xeTable, row);
12804
- return editStore.insertMaps[rowid];
12810
+ return !!editStore.insertMaps[rowid];
12805
12811
  },
12806
12812
  /**
12807
12813
  * 删除所有新增的临时数据
@@ -14119,7 +14125,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
14119
14125
  } = treeOpts;
14120
14126
  const rowid = getRowid($xeTable, row);
14121
14127
  if (lazy && row[hasChildField] && !treeExpandLazyLoadedMaps[rowid]) {
14122
- tableMethods.clearTreeExpandLoaded(row).then(() => {
14128
+ return tableMethods.clearTreeExpandLoaded(row).then(() => {
14123
14129
  return handleAsyncTreeExpandChilds(row);
14124
14130
  }).then(() => {
14125
14131
  if (transform) {
@@ -16829,6 +16835,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16829
16835
  const trEl = evnt.currentTarget;
16830
16836
  const rowid = trEl.getAttribute('rowid');
16831
16837
  const row = $xeTable.getRowById(rowid);
16838
+ console.log(rowid);
16832
16839
  if (row) {
16833
16840
  evnt.preventDefault();
16834
16841
  evnt.preventDefault();
@@ -16966,6 +16973,7 @@ const customStorageKey = 'VXE_CUSTOM_STORE';
16966
16973
  oldIndex: oafIndex
16967
16974
  }
16968
16975
  }, evnt);
16976
+ $xeTable.saveCustomStore('update:sort');
16969
16977
  }).catch(() => {});
16970
16978
  }
16971
16979
  }
@@ -19289,8 +19297,25 @@ edit_hook_hooks.add('tableEditModule', {
19289
19297
  if (treeConfig && transform) {
19290
19298
  insertTreeRow(newRecords, false);
19291
19299
  } else {
19292
- afterFullData.unshift(...newRecords);
19293
- tableFullData.unshift(...newRecords);
19300
+ newRecords.forEach(item => {
19301
+ const rowid = getRowid($xeTable, item);
19302
+ const rest = {
19303
+ row: item,
19304
+ rowid,
19305
+ seq: -1,
19306
+ index: -1,
19307
+ _index: -1,
19308
+ $index: -1,
19309
+ items: afterFullData,
19310
+ parent: null,
19311
+ level: 0,
19312
+ height: 0
19313
+ };
19314
+ fullDataRowIdData[rowid] = rest;
19315
+ fullAllDataRowIdData[rowid] = rest;
19316
+ afterFullData.push(item);
19317
+ tableFullData.push(item);
19318
+ });
19294
19319
  // 刷新单元格合并
19295
19320
  mergeList.forEach(mergeItem => {
19296
19321
  const {
@@ -19307,8 +19332,25 @@ edit_hook_hooks.add('tableEditModule', {
19307
19332
  if (treeConfig && transform) {
19308
19333
  insertTreeRow(newRecords, true);
19309
19334
  } else {
19310
- afterFullData.push(...newRecords);
19311
- tableFullData.push(...newRecords);
19335
+ newRecords.forEach(item => {
19336
+ const rowid = getRowid($xeTable, item);
19337
+ const rest = {
19338
+ row: item,
19339
+ rowid,
19340
+ seq: -1,
19341
+ index: -1,
19342
+ _index: -1,
19343
+ $index: -1,
19344
+ items: afterFullData,
19345
+ parent: null,
19346
+ level: 0,
19347
+ height: 0
19348
+ };
19349
+ fullDataRowIdData[rowid] = rest;
19350
+ fullAllDataRowIdData[rowid] = rest;
19351
+ afterFullData.push(item);
19352
+ tableFullData.push(item);
19353
+ });
19312
19354
  // 刷新单元格合并
19313
19355
  mergeList.forEach(mergeItem => {
19314
19356
  const {