vxe-table 3.18.6 → 3.18.8
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.
- package/es/style.css +1 -1
- package/es/table/src/methods.js +32 -5
- package/es/table/src/table.js +41 -3
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +110 -10
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +43 -5
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +65 -3
- package/lib/table/src/table.min.js +1 -1
- package/lib/ui/index.js +1 -1
- package/lib/ui/index.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +1 -1
- package/packages/table/src/methods.ts +34 -5
- package/packages/table/src/table.ts +41 -3
- /package/es/{iconfont.1756974415046.ttf → iconfont.1757293907433.ttf} +0 -0
- /package/es/{iconfont.1756974415046.woff → iconfont.1757293907433.woff} +0 -0
- /package/es/{iconfont.1756974415046.woff2 → iconfont.1757293907433.woff2} +0 -0
- /package/lib/{iconfont.1756974415046.ttf → iconfont.1757293907433.ttf} +0 -0
- /package/lib/{iconfont.1756974415046.woff → iconfont.1757293907433.woff} +0 -0
- /package/lib/{iconfont.1756974415046.woff2 → iconfont.1757293907433.woff2} +0 -0
package/lib/table/src/methods.js
CHANGED
|
@@ -3238,7 +3238,7 @@ function clearRowDragData($xeTable) {
|
|
|
3238
3238
|
* @param {Event} evnt 事件
|
|
3239
3239
|
* @param {Row} row 行对象
|
|
3240
3240
|
*/
|
|
3241
|
-
function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
|
|
3241
|
+
function handleTooltip($xeTable, evnt, type, tdEl, overflowElem, tipElem, params) {
|
|
3242
3242
|
const reactData = $xeTable;
|
|
3243
3243
|
const tipOverEl = overflowElem || tdEl;
|
|
3244
3244
|
if (!tipOverEl) {
|
|
@@ -3262,16 +3262,19 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
|
|
|
3262
3262
|
const content = useCustom ? customContent : _xeUtils.default.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
3263
3263
|
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
3264
3264
|
if (content && (showAll || useCustom || isOver)) {
|
|
3265
|
+
const tipContent = (0, _utils.formatText)(content);
|
|
3265
3266
|
Object.assign(tooltipStore, {
|
|
3266
3267
|
row,
|
|
3267
3268
|
column,
|
|
3268
3269
|
visible: true,
|
|
3270
|
+
content: tipContent,
|
|
3271
|
+
type,
|
|
3269
3272
|
currOpts: {}
|
|
3270
3273
|
});
|
|
3271
3274
|
$xeTable.$nextTick(() => {
|
|
3272
3275
|
const $tooltip = $xeTable.$refs.refTooltip;
|
|
3273
3276
|
if ($tooltip && $tooltip.open) {
|
|
3274
|
-
$tooltip.open(isOver ? tipOverEl : tipElem,
|
|
3277
|
+
$tooltip.open(isOver ? tipOverEl : tipElem, tipContent);
|
|
3275
3278
|
}
|
|
3276
3279
|
});
|
|
3277
3280
|
}
|
|
@@ -8021,7 +8024,7 @@ const Methods = {
|
|
|
8021
8024
|
}
|
|
8022
8025
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
8023
8026
|
const ctEl = thEl.querySelector('.vxe-cell--title');
|
|
8024
|
-
handleTooltip($xeTable, evnt, thEl, ((0, _dom.hasClass)(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params);
|
|
8027
|
+
handleTooltip($xeTable, evnt, 'header', thEl, ((0, _dom.hasClass)(thEl, 'col--ellipsis') ? ctEl : cWrapperEl) || cWrapperEl, ctEl || cellEl, params);
|
|
8025
8028
|
}
|
|
8026
8029
|
},
|
|
8027
8030
|
/**
|
|
@@ -8071,7 +8074,7 @@ const Methods = {
|
|
|
8071
8074
|
if (!tipEl) {
|
|
8072
8075
|
tipEl = ctEl;
|
|
8073
8076
|
}
|
|
8074
|
-
handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tipEl, params);
|
|
8077
|
+
handleTooltip($xeTable, evnt, 'body', tdEl, ovEl || ctEl, tipEl, params);
|
|
8075
8078
|
}
|
|
8076
8079
|
},
|
|
8077
8080
|
/**
|
|
@@ -8098,7 +8101,7 @@ const Methods = {
|
|
|
8098
8101
|
if (!tipEl) {
|
|
8099
8102
|
tipEl = ctEl;
|
|
8100
8103
|
}
|
|
8101
|
-
handleTooltip($xeTable, evnt, tdEl, ovEl || ctEl, tipEl, params);
|
|
8104
|
+
handleTooltip($xeTable, evnt, 'footer', tdEl, ovEl || ctEl, tipEl, params);
|
|
8102
8105
|
}
|
|
8103
8106
|
},
|
|
8104
8107
|
openTooltip(target, content) {
|
|
@@ -8128,6 +8131,7 @@ const Methods = {
|
|
|
8128
8131
|
column: null,
|
|
8129
8132
|
content: null,
|
|
8130
8133
|
visible: false,
|
|
8134
|
+
type: null,
|
|
8131
8135
|
currOpts: {}
|
|
8132
8136
|
});
|
|
8133
8137
|
if (tooltip) {
|
|
@@ -11671,6 +11675,40 @@ const Methods = {
|
|
|
11671
11675
|
}
|
|
11672
11676
|
return $xeTable.$nextTick();
|
|
11673
11677
|
},
|
|
11678
|
+
getRowGroups() {
|
|
11679
|
+
const $xeTable = this;
|
|
11680
|
+
const props = $xeTable;
|
|
11681
|
+
const reactData = $xeTable;
|
|
11682
|
+
const internalData = $xeTable;
|
|
11683
|
+
const {
|
|
11684
|
+
aggregateConfig,
|
|
11685
|
+
rowGroupConfig
|
|
11686
|
+
} = props;
|
|
11687
|
+
const {
|
|
11688
|
+
fullColumnFieldData
|
|
11689
|
+
} = internalData;
|
|
11690
|
+
if (aggregateConfig || rowGroupConfig) {
|
|
11691
|
+
const {
|
|
11692
|
+
rowGroupList
|
|
11693
|
+
} = reactData;
|
|
11694
|
+
return rowGroupList.map(({
|
|
11695
|
+
field
|
|
11696
|
+
}) => {
|
|
11697
|
+
const colRet = fullColumnFieldData[field];
|
|
11698
|
+
if (colRet) {
|
|
11699
|
+
return colRet.column;
|
|
11700
|
+
}
|
|
11701
|
+
return {
|
|
11702
|
+
field
|
|
11703
|
+
};
|
|
11704
|
+
});
|
|
11705
|
+
}
|
|
11706
|
+
return [];
|
|
11707
|
+
},
|
|
11708
|
+
getRowGroupFields() {
|
|
11709
|
+
const $xeTable = this;
|
|
11710
|
+
return $xeTable.getRowGroups().map(item => item.field);
|
|
11711
|
+
},
|
|
11674
11712
|
clearRowGroups() {
|
|
11675
11713
|
const $xeTable = this;
|
|
11676
11714
|
const props = $xeTable;
|