vxe-table 4.13.22 → 4.13.23

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 +25 -11
  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 +35 -26
  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 +16 -10
  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 +25 -11
  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.1746836522499.ttf → iconfont.1746863474194.ttf} +0 -0
  42. /package/es/{iconfont.1746836522499.woff → iconfont.1746863474194.woff} +0 -0
  43. /package/es/{iconfont.1746836522499.woff2 → iconfont.1746863474194.woff2} +0 -0
  44. /package/lib/{iconfont.1746836522499.ttf → iconfont.1746863474194.ttf} +0 -0
  45. /package/lib/{iconfont.1746836522499.woff → iconfont.1746863474194.woff} +0 -0
  46. /package/lib/{iconfont.1746836522499.woff2 → iconfont.1746863474194.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.13.22";
3141
+ const version = "4.13.23";
3142
3142
  core_.VxeUI.version = version;
3143
3143
  core_.VxeUI.tableVersion = version;
3144
3144
  core_.VxeUI.setConfig({
@@ -3599,7 +3599,7 @@ var esnext_iterator_some = __webpack_require__(7550);
3599
3599
  const {
3600
3600
  log: log_log
3601
3601
  } = core_.VxeUI;
3602
- const log_version = `table v${"4.13.22"}`;
3602
+ const log_version = `table v${"4.13.23"}`;
3603
3603
  const warnLog = log_log.create('warn', log_version);
3604
3604
  const errLog = log_log.create('error', log_version);
3605
3605
  ;// ./packages/table/src/columnInfo.ts
@@ -3851,6 +3851,12 @@ function toCssUnit(val, unit = 'px') {
3851
3851
  }
3852
3852
  return `${val || ''}`;
3853
3853
  }
3854
+ function queryElement(elem, selector) {
3855
+ if (elem) {
3856
+ return elem.querySelector(selector);
3857
+ }
3858
+ return null;
3859
+ }
3854
3860
  function getDomNode() {
3855
3861
  const documentElement = document.documentElement;
3856
3862
  const bodyElem = document.body;
@@ -4138,7 +4144,7 @@ function getPaddingLeftRightSize(elem) {
4138
4144
  }
4139
4145
  return 0;
4140
4146
  }
4141
- function getElementMarginWidth(elem) {
4147
+ function getElementMarginAndWidth(elem) {
4142
4148
  if (elem) {
4143
4149
  const computedStyle = getComputedStyle(elem);
4144
4150
  const marginLeft = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(computedStyle.marginLeft);
@@ -4147,9 +4153,6 @@ function getElementMarginWidth(elem) {
4147
4153
  }
4148
4154
  return 0;
4149
4155
  }
4150
- function queryCellElement(cell, selector) {
4151
- return cell.querySelector('.vxe-cell' + selector);
4152
- }
4153
4156
  function toFilters(filters) {
4154
4157
  if (filters && external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(filters)) {
4155
4158
  return filters.map(({
@@ -4262,19 +4265,19 @@ function getColReMinWidth(params) {
4262
4265
  const showTitle = headOverflow === 'title';
4263
4266
  const showTooltip = headOverflow === true || headOverflow === 'tooltip';
4264
4267
  const hasEllipsis = showTitle || showTooltip || showEllipsis;
4265
- 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);
4266
- const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryCellElement(cell, ''));
4268
+ 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);
4269
+ const paddingLeftRight = getPaddingLeftRightSize(cell) + getPaddingLeftRightSize(queryElement(cell, '.vxe-cell'));
4267
4270
  let mWidth = minTitleWidth + paddingLeftRight;
4268
4271
  // 默认最小宽处理
4269
4272
  if (hasEllipsis) {
4270
- const dragIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--drag-handle'));
4271
- const checkboxIconWidth = getPaddingLeftRightSize(queryCellElement(cell, '>.vxe-cell--checkbox'));
4272
- const requiredIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--required-icon'));
4273
- const editIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--edit-icon'));
4274
- const prefixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-prefix-icon'));
4275
- const suffixIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell-title-suffix-icon'));
4276
- const sortIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--sort'));
4277
- const filterIconWidth = getElementMarginWidth(queryCellElement(cell, '>.vxe-cell--filter'));
4273
+ const dragIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--drag-handle'));
4274
+ const checkboxIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--checkbox'));
4275
+ const requiredIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--required-icon'));
4276
+ const editIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--edit-icon'));
4277
+ const prefixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-prefix-icon'));
4278
+ const suffixIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell-title-suffix-icon'));
4279
+ const sortIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--sort'));
4280
+ const filterIconWidth = getElementMarginAndWidth(queryElement(cell, '.vxe-cell--filter'));
4278
4281
  mWidth += dragIconWidth + checkboxIconWidth + requiredIconWidth + editIconWidth + prefixIconWidth + suffixIconWidth + filterIconWidth + sortIconWidth;
4279
4282
  }
4280
4283
  // 如果设置最小宽
@@ -4676,15 +4679,17 @@ function renderTitlePrefixIcon(params) {
4676
4679
  } = params;
4677
4680
  const titlePrefix = column.titlePrefix || column.titleHelp;
4678
4681
  if (titlePrefix) {
4679
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
4680
- class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : '', titlePrefix.icon || cell_getIcon().TABLE_TITLE_PREFIX],
4682
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
4683
+ class: ['vxe-cell-title-prefix-icon', titlePrefix.iconStatus ? `theme--${titlePrefix.iconStatus}` : ''],
4681
4684
  onMouseenter(evnt) {
4682
4685
  $table.triggerHeaderTitleEvent(evnt, titlePrefix, params);
4683
4686
  },
4684
4687
  onMouseleave(evnt) {
4685
4688
  $table.handleTargetLeaveEvent(evnt);
4686
4689
  }
4687
- });
4690
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
4691
+ class: titlePrefix.icon || cell_getIcon().TABLE_TITLE_PREFIX
4692
+ })]);
4688
4693
  }
4689
4694
  return renderEmptyElement($table);
4690
4695
  }
@@ -4695,15 +4700,17 @@ function renderTitleSuffixIcon(params) {
4695
4700
  } = params;
4696
4701
  const titleSuffix = column.titleSuffix;
4697
4702
  if (titleSuffix) {
4698
- return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
4699
- class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : '', titleSuffix.icon || cell_getIcon().TABLE_TITLE_SUFFIX],
4703
+ return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
4704
+ class: ['vxe-cell-title-suffix-icon', titleSuffix.iconStatus ? `theme--${titleSuffix.iconStatus}` : ''],
4700
4705
  onMouseenter(evnt) {
4701
4706
  $table.triggerHeaderTitleEvent(evnt, titleSuffix, params);
4702
4707
  },
4703
4708
  onMouseleave(evnt) {
4704
4709
  $table.handleTargetLeaveEvent(evnt);
4705
4710
  }
4706
- });
4711
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
4712
+ class: titleSuffix.icon || cell_getIcon().TABLE_TITLE_SUFFIX
4713
+ })]);
4707
4714
  }
4708
4715
  return renderEmptyElement($table);
4709
4716
  }
@@ -5988,11 +5995,13 @@ const Cell = {
5988
5995
  }
5989
5996
  let editIconVNs = [];
5990
5997
  if (isEnableConf(editConfig)) {
5991
- editIconVNs = [isRequired && editOpts.showAsterisk ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
5998
+ editIconVNs = [isRequired && editOpts.showAsterisk ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
5992
5999
  class: 'vxe-cell--required-icon'
5993
- }) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
5994
- class: ['vxe-cell--edit-icon', editOpts.icon || cell_getIcon().TABLE_EDIT]
5995
- }) : renderEmptyElement($table)];
6000
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i')]) : renderEmptyElement($table), isEnableConf(editRender) && editOpts.showIcon ? (0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('span', {
6001
+ class: 'vxe-cell--edit-icon'
6002
+ }, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.h)('i', {
6003
+ class: editOpts.icon || cell_getIcon().TABLE_EDIT
6004
+ })]) : renderEmptyElement($table)];
5996
6005
  }
5997
6006
  return renderHeaderCellBaseVNs(params, editIconVNs.concat(Cell.renderHeaderTitle(params)).concat(sortable ? Cell.renderSortIcon(params) : []).concat(filters ? Cell.renderFilterIcon(params) : []));
5998
6007
  },