vxe-table 3.15.7 → 3.15.9

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 (49) 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/render/index.js +16 -3
  6. package/es/table/src/footer.js +11 -15
  7. package/es/table/src/header.js +20 -11
  8. package/es/table/src/methods.js +9 -5
  9. package/es/table/style.css +12 -5
  10. package/es/table/style.min.css +1 -1
  11. package/es/ui/index.js +3 -3
  12. package/es/ui/src/log.js +1 -1
  13. package/es/vxe-table/style.css +12 -5
  14. package/es/vxe-table/style.min.css +1 -1
  15. package/lib/index.css +1 -1
  16. package/lib/index.min.css +1 -1
  17. package/lib/index.umd.js +46 -37
  18. package/lib/index.umd.min.js +1 -1
  19. package/lib/style.css +1 -1
  20. package/lib/style.min.css +1 -1
  21. package/lib/table/render/index.js +17 -3
  22. package/lib/table/render/index.min.js +1 -1
  23. package/lib/table/src/footer.js +10 -15
  24. package/lib/table/src/footer.min.js +1 -1
  25. package/lib/table/src/header.js +5 -10
  26. package/lib/table/src/header.min.js +1 -1
  27. package/lib/table/src/methods.js +10 -5
  28. package/lib/table/src/methods.min.js +1 -1
  29. package/lib/table/style/style.css +12 -5
  30. package/lib/table/style/style.min.css +1 -1
  31. package/lib/ui/index.js +3 -3
  32. package/lib/ui/index.min.js +1 -1
  33. package/lib/ui/src/log.js +1 -1
  34. package/lib/ui/src/log.min.js +1 -1
  35. package/lib/vxe-table/style/style.css +12 -5
  36. package/lib/vxe-table/style/style.min.css +1 -1
  37. package/package.json +2 -2
  38. package/packages/table/render/index.ts +17 -3
  39. package/packages/table/src/footer.ts +11 -15
  40. package/packages/table/src/header.ts +20 -11
  41. package/packages/table/src/methods.ts +11 -5
  42. package/packages/ui/index.ts +2 -2
  43. package/styles/components/table.scss +30 -17
  44. /package/es/{iconfont.1745290222894.ttf → iconfont.1745458119157.ttf} +0 -0
  45. /package/es/{iconfont.1745290222894.woff → iconfont.1745458119157.woff} +0 -0
  46. /package/es/{iconfont.1745290222894.woff2 → iconfont.1745458119157.woff2} +0 -0
  47. /package/lib/{iconfont.1745290222894.ttf → iconfont.1745458119157.ttf} +0 -0
  48. /package/lib/{iconfont.1745290222894.woff → iconfont.1745458119157.woff} +0 -0
  49. /package/lib/{iconfont.1745290222894.woff2 → iconfont.1745458119157.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.15.7";
2223
+ const version = "3.15.9";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2433,8 +2433,8 @@ core_.VxeUI.setConfig({
2433
2433
  oSize: 2
2434
2434
  },
2435
2435
  scrollbarConfig: {
2436
- // width: 0,
2437
- // height: 0
2436
+ width: 14,
2437
+ height: 14
2438
2438
  }
2439
2439
  },
2440
2440
  // export: {
@@ -2858,7 +2858,7 @@ function isNodeElement(elem) {
2858
2858
  const {
2859
2859
  log: log_log
2860
2860
  } = core_.VxeUI;
2861
- const log_version = `table v${"3.15.7"}`;
2861
+ const log_version = `table v${"3.15.9"}`;
2862
2862
  const warnLog = log_log.create('warn', log_version);
2863
2863
  const errLog = log_log.create('error', log_version);
2864
2864
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -6366,7 +6366,8 @@ function updateStyle($xeTable) {
6366
6366
  columnStore,
6367
6367
  editStore,
6368
6368
  isAllOverflow,
6369
- expandColumn
6369
+ expandColumn,
6370
+ isColLoading
6370
6371
  } = reactData;
6371
6372
  const {
6372
6373
  visibleColumn,
@@ -6485,15 +6486,17 @@ function updateStyle($xeTable) {
6485
6486
  renderColumnList = visibleColumn;
6486
6487
  } else {
6487
6488
  // 如果是使用优化模式
6488
- if (scrollXLoad || scrollYLoad || allColumnHeaderOverflow) {
6489
+ if (scrollXLoad && allColumnHeaderOverflow) {
6489
6490
  if (spanMethod || footerSpanMethod) {
6490
6491
  // 如果不支持优化模式
6491
6492
  } else {
6492
6493
  isOptimizeMode = true;
6493
6494
  }
6494
6495
  }
6495
- if (fixedType) {
6496
+ if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
6496
6497
  renderColumnList = visibleColumn;
6498
+ }
6499
+ if (fixedType) {
6497
6500
  // 如果是使用优化模式
6498
6501
  if (isOptimizeMode) {
6499
6502
  renderColumnList = fixedColumn || [];
@@ -6579,15 +6582,17 @@ function updateStyle($xeTable) {
6579
6582
  let renderColumnList = tableColumn;
6580
6583
  let isOptimizeMode = false;
6581
6584
  // 如果是使用优化模式
6582
- if (scrollXLoad || scrollYLoad || allColumnFooterOverflow) {
6585
+ if (scrollXLoad && allColumnFooterOverflow) {
6583
6586
  if (spanMethod || footerSpanMethod) {
6584
6587
  // 如果不支持优化模式
6585
6588
  } else {
6586
6589
  isOptimizeMode = true;
6587
6590
  }
6588
6591
  }
6589
- if (fixedType) {
6592
+ if (!isOptimizeMode) {
6590
6593
  renderColumnList = visibleColumn;
6594
+ }
6595
+ if (fixedType) {
6591
6596
  if (isOptimizeMode) {
6592
6597
  renderColumnList = fixedColumn || [];
6593
6598
  }
@@ -17984,10 +17989,10 @@ const header_renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) =>
17984
17989
  const isPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(headerCellOpts.padding) ? headerCellOpts.padding : cellOpts.padding;
17985
17990
  const headOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isUndefined(showHeaderOverflow) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNull(showHeaderOverflow) ? allColumnHeaderOverflow : showHeaderOverflow;
17986
17991
  const headAlign = headerAlign || (compConf ? compConf.tableHeaderCellAlign : '') || allHeaderAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
17987
- let showEllipsis = headOverflow === 'ellipsis';
17992
+ const showEllipsis = headOverflow === 'ellipsis';
17988
17993
  const showTitle = headOverflow === 'title';
17989
17994
  const showTooltip = headOverflow === true || headOverflow === 'tooltip';
17990
- let hasEllipsis = showTitle || showTooltip || showEllipsis;
17995
+ const hasEllipsis = showTitle || showTooltip || showEllipsis;
17991
17996
  let hasFilter = false;
17992
17997
  let firstFilterOption = null;
17993
17998
  if (filters) {
@@ -18019,10 +18024,6 @@ const header_renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) =>
18019
18024
  click: evnt => $xeTable.triggerHeaderCellClickEvent(evnt, cellParams),
18020
18025
  dblclick: evnt => $xeTable.triggerHeaderCellDblclickEvent(evnt, cellParams)
18021
18026
  };
18022
- // 虚拟滚动不支持动态高度
18023
- if (scrollXLoad && !hasEllipsis) {
18024
- showEllipsis = hasEllipsis = true;
18025
- }
18026
18027
  const isColDragCell = columnOpts.drag && columnDragOpts.trigger === 'cell';
18027
18028
  let isDisabledDrag = false;
18028
18029
  if (isColDragCell) {
@@ -18045,7 +18046,7 @@ const header_renderRows = (h, _vm, isGroup, isOptimizeMode, cols, $rowIndex) =>
18045
18046
  const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
18046
18047
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
18047
18048
  let isVNPreEmptyStatus = false;
18048
- if (!isGroup) {
18049
+ if (isOptimizeMode && !isGroup) {
18049
18050
  if (!dragCol || dragCol.id !== colid) {
18050
18051
  if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
18051
18052
  isVNPreEmptyStatus = true;
@@ -18240,7 +18241,6 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
18240
18241
  isColLoading,
18241
18242
  overflowX,
18242
18243
  scrollXLoad,
18243
- scrollYLoad,
18244
18244
  dragCol
18245
18245
  } = tableReactData;
18246
18246
  const {
@@ -18255,14 +18255,14 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
18255
18255
  renderColumnList = visibleColumn;
18256
18256
  } else {
18257
18257
  // 如果是使用优化模式
18258
- if (scrollXLoad || scrollYLoad || allColumnHeaderOverflow) {
18258
+ if (scrollXLoad && allColumnHeaderOverflow) {
18259
18259
  if (spanMethod || footerSpanMethod) {
18260
18260
  // 如果不支持优化模式
18261
18261
  } else {
18262
18262
  isOptimizeMode = true;
18263
18263
  }
18264
18264
  }
18265
- if (!isColLoading && (fixedType || !overflowX)) {
18265
+ if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
18266
18266
  renderColumnList = visibleColumn;
18267
18267
  }
18268
18268
  if (fixedType) {
@@ -18385,7 +18385,7 @@ const {
18385
18385
  renderer: footer_renderer,
18386
18386
  renderEmptyElement: footer_renderEmptyElement
18387
18387
  } = core_.VxeUI;
18388
- function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex, _rowIndex) {
18388
+ function footer_renderRows(h, _vm, isOptimizeMode, tableColumn, footerTableData, row, $rowIndex, _rowIndex) {
18389
18389
  const props = _vm;
18390
18390
  const $xeTable = _vm.$parent;
18391
18391
  const tableProps = $xeTable;
@@ -18449,10 +18449,10 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
18449
18449
  const isPadding = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(footerCellOpts.padding) ? footerCellOpts.padding : cellOpts.padding;
18450
18450
  const footOverflow = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(showFooterOverflow) ? allColumnFooterOverflow : showFooterOverflow;
18451
18451
  const footAlign = footerAlign || (compConf ? compConf.tableFooterCellAlign : '') || allFooterAlign || align || (compConf ? compConf.tableCellAlign : '') || allAlign;
18452
- let showEllipsis = footOverflow === 'ellipsis';
18452
+ const showEllipsis = footOverflow === 'ellipsis';
18453
18453
  const showTitle = footOverflow === 'title';
18454
18454
  const showTooltip = footOverflow === true || footOverflow === 'tooltip';
18455
- let hasEllipsis = showTitle || showTooltip || showEllipsis;
18455
+ const hasEllipsis = showTitle || showTooltip || showEllipsis;
18456
18456
  const showResizable = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isBoolean(column.resizable) ? column.resizable : columnOpts.resizable || allResizable;
18457
18457
  const attrs = {
18458
18458
  colid
@@ -18478,10 +18478,6 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
18478
18478
  type: footer_renderType,
18479
18479
  data: footerTableData
18480
18480
  };
18481
- // 纵向虚拟滚动不支持动态行高
18482
- if (scrollXLoad && !hasEllipsis) {
18483
- showEllipsis = hasEllipsis = true;
18484
- }
18485
18481
  if (showTitle || showTooltip || showAllTip) {
18486
18482
  tfOns.mouseenter = evnt => {
18487
18483
  if (showTitle) {
@@ -18548,7 +18544,7 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
18548
18544
  const isLastColumn = $columnIndex === tableColumn.length - 1;
18549
18545
  const isAutoCellWidth = !column.resizeWidth && (column.minWidth === 'auto' || column.width === 'auto');
18550
18546
  let isVNPreEmptyStatus = false;
18551
- if (!isMergeCell) {
18547
+ if (isOptimizeMode && !isMergeCell) {
18552
18548
  if (scrollXLoad && !column.fixed && !virtualXOpts.immediate && (_columnIndex < scrollXStore.visibleStartIndex - scrollXStore.preloadSize || _columnIndex > scrollXStore.visibleEndIndex + scrollXStore.preloadSize)) {
18553
18549
  isVNPreEmptyStatus = true;
18554
18550
  }
@@ -18601,7 +18597,7 @@ function footer_renderRows(h, _vm, tableColumn, footerTableData, row, $rowIndex,
18601
18597
  }) : footer_renderEmptyElement($xeTable)]);
18602
18598
  });
18603
18599
  }
18604
- function footer_renderHeads(h, _vm, renderColumnList) {
18600
+ function footer_renderHeads(h, _vm, isOptimizeMode, renderColumnList) {
18605
18601
  const props = _vm;
18606
18602
  const $xeTable = _vm.$parent;
18607
18603
  const tableProps = $xeTable;
@@ -18639,13 +18635,13 @@ function footer_renderHeads(h, _vm, renderColumnList) {
18639
18635
  class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
18640
18636
  style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : undefined
18641
18637
  }
18642
- }, footer_renderRows(h, _vm, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
18638
+ }, footer_renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
18643
18639
  }
18644
18640
  return h('tr', {
18645
18641
  key: $rowIndex,
18646
18642
  class: ['vxe-footer--row', footerRowClassName ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowClassName) ? footerRowClassName(rowParams) : footerRowClassName : ''],
18647
18643
  style: footerRowStyle ? external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isFunction(footerRowStyle) ? footerRowStyle(rowParams) : footerRowStyle : undefined
18648
- }, footer_renderRows(h, _vm, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
18644
+ }, footer_renderRows(h, _vm, isOptimizeMode, renderColumnList, footerTableData, row, $rowIndex, _rowIndex));
18649
18645
  });
18650
18646
  }
18651
18647
  /* harmony default export */ var footer = ({
@@ -18733,20 +18729,19 @@ function footer_renderHeads(h, _vm, renderColumnList) {
18733
18729
  isColLoading,
18734
18730
  overflowX,
18735
18731
  scrollXLoad,
18736
- scrollYLoad,
18737
18732
  dragCol
18738
18733
  } = tableReactData;
18739
18734
  let renderColumnList = tableColumn;
18740
18735
  let isOptimizeMode = false;
18741
18736
  // 如果是使用优化模式
18742
- if (scrollXLoad || scrollYLoad || allColumnFooterOverflow) {
18737
+ if (scrollXLoad && allColumnFooterOverflow) {
18743
18738
  if (spanMethod || footerSpanMethod) {
18744
18739
  // 如果不支持优化模式
18745
18740
  } else {
18746
18741
  isOptimizeMode = true;
18747
18742
  }
18748
18743
  }
18749
- if (!isColLoading && (fixedType || !overflowX)) {
18744
+ if (!isOptimizeMode || !isColLoading && (fixedType || !overflowX)) {
18750
18745
  renderColumnList = visibleColumn;
18751
18746
  }
18752
18747
  if (fixedType) {
@@ -18826,7 +18821,7 @@ function footer_renderHeads(h, _vm, renderColumnList) {
18826
18821
  */
18827
18822
  h('tfoot', {
18828
18823
  ref: 'refFooterTFoot'
18829
- }, footer_renderHeads(h, this, renderColumnList))])])]);
18824
+ }, footer_renderHeads(h, this, isOptimizeMode, renderColumnList))])])]);
18830
18825
  }
18831
18826
  });
18832
18827
  ;// CONCATENATED MODULE: ./packages/table/src/props.ts
@@ -31774,7 +31769,18 @@ function defaultEditRender(h, renderOpts, params) {
31774
31769
  on: getEditOns(renderOpts, params)
31775
31770
  })];
31776
31771
  }
31777
- function radioAndCheckboxEditRender(h, renderOpts, params) {
31772
+ function checkboxEditRender(h, renderOpts, params) {
31773
+ const {
31774
+ row,
31775
+ column
31776
+ } = params;
31777
+ const cellValue = getCellValue(row, column);
31778
+ return [h(getDefaultComponent(renderOpts), {
31779
+ props: getCellEditProps(renderOpts, params, cellValue),
31780
+ on: getEditOns(renderOpts, params)
31781
+ })];
31782
+ }
31783
+ function radioAndCheckboxGroupEditRender(h, renderOpts, params) {
31778
31784
  const {
31779
31785
  options
31780
31786
  } = renderOpts;
@@ -32487,10 +32493,13 @@ render_renderer.mixin({
32487
32493
  }
32488
32494
  },
32489
32495
  VxeRadioGroup: {
32490
- renderTableDefault: radioAndCheckboxEditRender
32496
+ renderTableDefault: radioAndCheckboxGroupEditRender
32497
+ },
32498
+ VxeCheckbox: {
32499
+ renderTableDefault: checkboxEditRender
32491
32500
  },
32492
32501
  VxeCheckboxGroup: {
32493
- renderTableDefault: radioAndCheckboxEditRender
32502
+ renderTableDefault: radioAndCheckboxGroupEditRender
32494
32503
  },
32495
32504
  VxeSwitch: {
32496
32505
  tableAutoFocus: 'button',