vxe-table 3.15.22 → 3.15.24

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 (46) 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/src/cell.js +21 -7
  6. package/es/table/src/util.js +12 -15
  7. package/es/table/style.css +15 -6
  8. package/es/table/style.min.css +1 -1
  9. package/es/ui/index.js +1 -1
  10. package/es/ui/src/dom.js +6 -0
  11. package/es/ui/src/log.js +1 -1
  12. package/es/vxe-table/style.css +15 -6
  13. package/es/vxe-table/style.min.css +1 -1
  14. package/helper/vetur/attributes.json +1 -1
  15. package/helper/vetur/tags.json +1 -1
  16. package/lib/index.css +1 -1
  17. package/lib/index.min.css +1 -1
  18. package/lib/index.umd.js +32 -23
  19. package/lib/index.umd.min.js +1 -1
  20. package/lib/style.css +1 -1
  21. package/lib/style.min.css +1 -1
  22. package/lib/table/src/cell.js +13 -7
  23. package/lib/table/src/cell.min.js +1 -1
  24. package/lib/table/src/util.js +11 -14
  25. package/lib/table/src/util.min.js +1 -1
  26. package/lib/table/style/style.css +15 -6
  27. package/lib/table/style/style.min.css +1 -1
  28. package/lib/ui/index.js +1 -1
  29. package/lib/ui/index.min.js +1 -1
  30. package/lib/ui/src/dom.js +7 -0
  31. package/lib/ui/src/dom.min.js +1 -1
  32. package/lib/ui/src/log.js +1 -1
  33. package/lib/ui/src/log.min.js +1 -1
  34. package/lib/vxe-table/style/style.css +15 -6
  35. package/lib/vxe-table/style/style.min.css +1 -1
  36. package/package.json +1 -1
  37. package/packages/table/src/cell.ts +21 -7
  38. package/packages/table/src/util.ts +12 -16
  39. package/packages/ui/src/dom.ts +7 -0
  40. package/styles/components/table.scss +23 -15
  41. /package/es/{iconfont.1746836465256.ttf → iconfont.1746864347026.ttf} +0 -0
  42. /package/es/{iconfont.1746836465256.woff → iconfont.1746864347026.woff} +0 -0
  43. /package/es/{iconfont.1746836465256.woff2 → iconfont.1746864347026.woff2} +0 -0
  44. /package/lib/{iconfont.1746836465256.ttf → iconfont.1746864347026.ttf} +0 -0
  45. /package/lib/{iconfont.1746836465256.woff → iconfont.1746864347026.woff} +0 -0
  46. /package/lib/{iconfont.1746836465256.woff2 → iconfont.1746864347026.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.22";
2223
+ const version = "3.15.24";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2740,6 +2740,12 @@ function toCssUnit(val, unit = 'px') {
2740
2740
  }
2741
2741
  return `${val || ''}`;
2742
2742
  }
2743
+ function queryElement(elem, selector) {
2744
+ if (elem) {
2745
+ return elem.querySelector(selector);
2746
+ }
2747
+ return null;
2748
+ }
2743
2749
  function getDomNode() {
2744
2750
  const documentElement = document.documentElement;
2745
2751
  const bodyElem = document.body;
@@ -2858,7 +2864,7 @@ function isNodeElement(elem) {
2858
2864
  const {
2859
2865
  log: log_log
2860
2866
  } = core_.VxeUI;
2861
- const log_version = `table v${"3.15.22"}`;
2867
+ const log_version = `table v${"3.15.24"}`;
2862
2868
  const warnLog = log_log.create('warn', log_version);
2863
2869
  const errLog = log_log.create('error', log_version);
2864
2870
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -3191,7 +3197,7 @@ function getPaddingLeftRightSize(elem) {
3191
3197
  }
3192
3198
  return 0;
3193
3199
  }
3194
- function getElementMarginWidth(elem) {
3200
+ function getElementMarginAndWidth(elem) {
3195
3201
  if (elem) {
3196
3202
  const computedStyle = getComputedStyle(elem);
3197
3203
  const marginLeft = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(computedStyle.marginLeft);
@@ -3279,9 +3285,6 @@ function getRootColumn($xeTable, column) {
3279
3285
  }
3280
3286
  return column;
3281
3287
  }
3282
- function queryCellElement(cell, selector) {
3283
- return cell.querySelector('.vxe-cell' + selector);
3284
- }
3285
3288
  function toFilters(filters) {
3286
3289
  if (filters && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(filters)) {
3287
3290
  return filters.map(({
@@ -3336,19 +3339,19 @@ function getColReMinWidth(params) {
3336
3339
  const showTitle = headOverflow === 'title';
3337
3340
  const showTooltip = headOverflow === true || headOverflow === 'tooltip';
3338
3341
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
3339
- const minTitleWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(cell).fontSize) || 14) * 1.6);
3340
- const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryCellElement(cell, ''));
3342
+ const minTitleWidth = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().floor((external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(getComputedStyle(cell).fontSize) || 14) * 1.8);
3343
+ const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryElement(cell, '.vxe-cell'));
3341
3344
  let mWidth = minTitleWidth + paddingLeftRight;
3342
3345
  // 默认最小宽处理
3343
3346
  if (hasEllipsis) {
3344
- const dragIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--drag-handle'));
3345
- const checkboxIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--checkbox'));
3346
- const requiredIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--required-icon'));
3347
- const editIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--edit-icon'));
3348
- const prefixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-prefix-icon'));
3349
- const suffixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-suffix-icon'));
3350
- const sortIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--sort'));
3351
- const filterIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--filter'));
3347
+ const dragIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--drag-handle'));
3348
+ const checkboxIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--checkbox'));
3349
+ const requiredIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--required-icon'));
3350
+ const editIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--edit-icon'));
3351
+ const prefixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-prefix-icon'));
3352
+ const suffixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-suffix-icon'));
3353
+ const sortIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--sort'));
3354
+ const filterIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--filter'));
3352
3355
  mWidth += dragIconWidth + checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth;
3353
3356
  }
3354
3357
  // 如果设置最小宽
@@ -3668,7 +3671,7 @@ function renderTitlePrefixIcon(h, params) {
3668
3671
  const titlePrefix = column.titlePrefix || column.titleHelp;
3669
3672
  if (titlePrefix) {
3670
3673
  return h('i', {
3671
- class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : '', titlePrefix.icon || cell_getIcon().TABLE_TITLE_PREFIX],
3674
+ class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ''],
3672
3675
  on: {
3673
3676
  mouseenter(evnt) {
3674
3677
  $table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
@@ -3677,7 +3680,9 @@ function renderTitlePrefixIcon(h, params) {
3677
3680
  $table.handleTargetLeaveEvent(evnt);
3678
3681
  }
3679
3682
  }
3680
- });
3683
+ }, [h('i', {
3684
+ class: titlePrefix.icon || cell_getIcon().TABLE_TITLE_PREFIX
3685
+ })]);
3681
3686
  }
3682
3687
  return renderEmptyElement($table);
3683
3688
  }
@@ -3689,7 +3694,7 @@ function renderTitleSuffixIcon(h, params) {
3689
3694
  const titleSuffix = column.titleSuffix;
3690
3695
  if (titleSuffix) {
3691
3696
  return h('i', {
3692
- class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : '', titleSuffix.icon || cell_getIcon().TABLE_TITLE_SUFFIX],
3697
+ class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ''],
3693
3698
  on: {
3694
3699
  mouseenter(evnt) {
3695
3700
  $table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
@@ -3698,7 +3703,9 @@ function renderTitleSuffixIcon(h, params) {
3698
3703
  $table.handleTargetLeaveEvent(evnt);
3699
3704
  }
3700
3705
  }
3701
- });
3706
+ }, [h('i', {
3707
+ class: titleSuffix.icon || cell_getIcon().TABLE_TITLE_SUFFIX
3708
+ })]);
3702
3709
  }
3703
3710
  return renderEmptyElement($table);
3704
3711
  }
@@ -4915,9 +4922,11 @@ const Cell = {
4915
4922
  if (isEnableConf(editConfig)) {
4916
4923
  editIconVNs = [isRequired && editOpts.showAsterisk ? h('i', {
4917
4924
  class: 'vxe-cell--required-icon'
4918
- }) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? h('i', {
4919
- class: ['vxe-cell--edit-icon', editOpts.icon || cell_getIcon().TABLE_EDIT]
4920
- }) : renderEmptyElement($table)];
4925
+ }, [h('i', {
4926
+ class: 'vxe-cell--required-icon'
4927
+ })]) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? h('i', {
4928
+ class: 'vxe-cell--edit-icon'
4929
+ }, [h('i')]) : renderEmptyElement($table)];
4921
4930
  }
4922
4931
  return renderHeaderCellBaseVNs(h, params, editIconVNs.concat(Cell.renderHeaderTitle(h, params)).concat(sortable ? Cell.renderSortIcon(h, params) : []).concat(filters ? Cell.renderFilterIcon(h, params) : []));
4923
4932
  },