vxe-table 3.14.0-beta.26 → 3.14.0-beta.27

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.
@@ -1695,9 +1695,10 @@ function hideDropTip($xeTable) {
1695
1695
  * @param {Event} evnt 事件
1696
1696
  * @param {Row} row 行对象
1697
1697
  */
1698
- function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
1698
+ function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
1699
1699
  const reactData = $xeTable;
1700
- if (!overflowElem) {
1700
+ const tipOverEl = overflowElem || tdEl;
1701
+ if (!tipOverEl) {
1701
1702
  return $xeTable.$nextTick();
1702
1703
  }
1703
1704
  params.cell = tdEl;
@@ -1707,9 +1708,8 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
1707
1708
  const { showAll, contentMethod } = tooltipOpts;
1708
1709
  const customContent = contentMethod ? contentMethod(params) : null;
1709
1710
  const useCustom = contentMethod && !XEUtils.eqNull(customContent);
1710
- const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? overflowElem.innerText : overflowElem.textContent).trim();
1711
- const isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
1712
- if (content && (showAll || useCustom || isCellOverflow)) {
1711
+ const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
1712
+ if (content && (showAll || useCustom || (tipOverEl.scrollWidth > tipOverEl.clientWidth))) {
1713
1713
  Object.assign(tooltipStore, {
1714
1714
  row,
1715
1715
  column,
@@ -1719,7 +1719,7 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
1719
1719
  $xeTable.$nextTick(() => {
1720
1720
  const $tooltip = $xeTable.$refs.refTooltip;
1721
1721
  if ($tooltip && $tooltip.open) {
1722
- $tooltip.open(isCellOverflow ? overflowElem : (tipElem || overflowElem), formatText(content));
1722
+ $tooltip.open(tipOverEl, formatText(content));
1723
1723
  }
1724
1724
  });
1725
1725
  }
@@ -5431,7 +5431,7 @@ const Methods = {
5431
5431
  return;
5432
5432
  }
5433
5433
  if (tooltipStore.column !== column || !tooltipStore.visible) {
5434
- handleTooltip($xeTable, evnt, thEl, cellEl, null, params);
5434
+ handleTooltip($xeTable, evnt, thEl, thEl.querySelector('.vxe-cell--title') || cellEl, params);
5435
5435
  }
5436
5436
  },
5437
5437
  /**
@@ -5461,7 +5461,7 @@ const Methods = {
5461
5461
  }
5462
5462
  }
5463
5463
  if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
5464
- handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), null, params);
5464
+ handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
5465
5465
  }
5466
5466
  },
5467
5467
  /**
@@ -5472,10 +5472,10 @@ const Methods = {
5472
5472
  const reactData = $xeTable;
5473
5473
  const { column } = params;
5474
5474
  const { tooltipStore } = reactData;
5475
- const cell = evnt.currentTarget;
5475
+ const tdEl = evnt.currentTarget;
5476
5476
  handleTargetEnterEvent($xeTable, tooltipStore.column !== column || !!tooltipStore.row);
5477
5477
  if (tooltipStore.column !== column || !tooltipStore.visible) {
5478
- handleTooltip($xeTable, evnt, cell, cell.querySelector('.vxe-cell--wrapper') || cell.children[0], null, params);
5478
+ handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
5479
5479
  }
5480
5480
  },
5481
5481
  openTooltip(target, content) {
package/es/ui/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  import { getFuncText } from './src/utils';
3
- export const version = "3.14.0-beta.26";
3
+ export const version = "3.14.0-beta.27";
4
4
  VxeUI.version = version;
5
5
  VxeUI.tableVersion = version;
6
6
  VxeUI.setConfig({
package/es/ui/src/log.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VxeUI } from '@vxe-ui/core';
2
2
  const { log } = VxeUI;
3
- const version = `table v${"3.14.0-beta.26"}`;
3
+ const version = `table v${"3.14.0-beta.27"}`;
4
4
  export const warnLog = log.create('warn', version);
5
5
  export const errLog = log.create('error', version);
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.14.0-beta.26";
2223
+ const version = "3.14.0-beta.27";
2224
2224
  core_.VxeUI.version = version;
2225
2225
  core_.VxeUI.tableVersion = version;
2226
2226
  core_.VxeUI.setConfig({
@@ -2844,7 +2844,7 @@ function isNodeElement(elem) {
2844
2844
  const {
2845
2845
  log: log_log
2846
2846
  } = core_.VxeUI;
2847
- const log_version = `table v${"3.14.0-beta.26"}`;
2847
+ const log_version = `table v${"3.14.0-beta.27"}`;
2848
2848
  const warnLog = log_log.create('warn', log_version);
2849
2849
  const errLog = log_log.create('error', log_version);
2850
2850
  ;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
@@ -7129,9 +7129,10 @@ function hideDropTip($xeTable) {
7129
7129
  * @param {Event} evnt 事件
7130
7130
  * @param {Row} row 行对象
7131
7131
  */
7132
- function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
7132
+ function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
7133
7133
  const reactData = $xeTable;
7134
- if (!overflowElem) {
7134
+ const tipOverEl = overflowElem || tdEl;
7135
+ if (!tipOverEl) {
7135
7136
  return $xeTable.$nextTick();
7136
7137
  }
7137
7138
  params.cell = tdEl;
@@ -7149,9 +7150,8 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
7149
7150
  } = tooltipOpts;
7150
7151
  const customContent = contentMethod ? contentMethod(params) : null;
7151
7152
  const useCustom = contentMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(customContent);
7152
- const content = useCustom ? customContent : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toString(column.type === 'html' ? overflowElem.innerText : overflowElem.textContent).trim();
7153
- const isCellOverflow = overflowElem.scrollWidth > overflowElem.clientWidth;
7154
- if (content && (showAll || useCustom || isCellOverflow)) {
7153
+ const content = useCustom ? customContent : external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
7154
+ if (content && (showAll || useCustom || tipOverEl.scrollWidth > tipOverEl.clientWidth)) {
7155
7155
  Object.assign(tooltipStore, {
7156
7156
  row,
7157
7157
  column,
@@ -7161,7 +7161,7 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
7161
7161
  $xeTable.$nextTick(() => {
7162
7162
  const $tooltip = $xeTable.$refs.refTooltip;
7163
7163
  if ($tooltip && $tooltip.open) {
7164
- $tooltip.open(isCellOverflow ? overflowElem : tipElem || overflowElem, formatText(content));
7164
+ $tooltip.open(tipOverEl, formatText(content));
7165
7165
  }
7166
7166
  });
7167
7167
  }
@@ -11456,7 +11456,7 @@ const Methods = {
11456
11456
  return;
11457
11457
  }
11458
11458
  if (tooltipStore.column !== column || !tooltipStore.visible) {
11459
- handleTooltip($xeTable, evnt, thEl, cellEl, null, params);
11459
+ handleTooltip($xeTable, evnt, thEl, thEl.querySelector('.vxe-cell--title') || cellEl, params);
11460
11460
  }
11461
11461
  },
11462
11462
  /**
@@ -11497,7 +11497,7 @@ const Methods = {
11497
11497
  }
11498
11498
  }
11499
11499
  if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
11500
- handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), null, params);
11500
+ handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
11501
11501
  }
11502
11502
  },
11503
11503
  /**
@@ -11512,10 +11512,10 @@ const Methods = {
11512
11512
  const {
11513
11513
  tooltipStore
11514
11514
  } = reactData;
11515
- const cell = evnt.currentTarget;
11515
+ const tdEl = evnt.currentTarget;
11516
11516
  handleTargetEnterEvent($xeTable, tooltipStore.column !== column || !!tooltipStore.row);
11517
11517
  if (tooltipStore.column !== column || !tooltipStore.visible) {
11518
- handleTooltip($xeTable, evnt, cell, cell.querySelector('.vxe-cell--wrapper') || cell.children[0], null, params);
11518
+ handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
11519
11519
  }
11520
11520
  },
11521
11521
  openTooltip(target, content) {
@@ -16817,7 +16817,10 @@ function renderRows(h, _vm, fixedType, isOptimizeMode, tableData, tableColumn) {
16817
16817
  attrs: {
16818
16818
  name: column.id
16819
16819
  },
16820
- key: $columnIndex
16820
+ key: $columnIndex,
16821
+ style: {
16822
+ width: `${column.renderWidth}px`
16823
+ }
16821
16824
  });
16822
16825
  })),
16823
16826
  /**
@@ -17291,7 +17294,10 @@ function renderHeads(h, _vm, isGroup, isOptimizeMode, headerGroups) {
17291
17294
  attrs: {
17292
17295
  name: column.id
17293
17296
  },
17294
- key: $columnIndex
17297
+ key: $columnIndex,
17298
+ style: {
17299
+ width: `${column.renderWidth}px`
17300
+ }
17295
17301
  });
17296
17302
  })),
17297
17303
  /**
@@ -17783,7 +17789,10 @@ function footer_renderHeads(h, _vm, renderColumnList) {
17783
17789
  attrs: {
17784
17790
  name: column.id
17785
17791
  },
17786
- key: $columnIndex
17792
+ key: $columnIndex,
17793
+ style: {
17794
+ width: `${column.renderWidth}px`
17795
+ }
17787
17796
  });
17788
17797
  })),
17789
17798
  /**