vxe-table 3.14.1 → 3.14.2
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/module/edit/mixin.js +3 -2
- package/es/table/module/keyboard/mixin.js +3 -2
- package/es/table/src/methods.js +10 -8
- package/es/table/src/table.js +6 -0
- package/es/ui/index.js +1 -1
- package/es/ui/src/dom.js +0 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +21 -12
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/module/edit/mixin.js +2 -1
- package/lib/table/module/edit/mixin.min.js +1 -1
- package/lib/table/module/keyboard/mixin.js +2 -1
- package/lib/table/module/keyboard/mixin.min.js +1 -1
- package/lib/table/src/methods.js +9 -7
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +6 -0
- 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/dom.js +0 -2
- package/lib/ui/src/dom.min.js +1 -1
- package/lib/ui/src/log.js +1 -1
- package/lib/ui/src/log.min.js +1 -1
- package/package.json +2 -2
- package/packages/table/module/edit/mixin.ts +4 -2
- package/packages/table/module/keyboard/mixin.ts +4 -2
- package/packages/table/src/methods.ts +11 -8
- package/packages/table/src/table.ts +6 -0
- package/packages/ui/src/dom.ts +0 -2
- /package/es/{iconfont.1743045564244.ttf → iconfont.1743125678150.ttf} +0 -0
- /package/es/{iconfont.1743045564244.woff → iconfont.1743125678150.woff} +0 -0
- /package/es/{iconfont.1743045564244.woff2 → iconfont.1743125678150.woff2} +0 -0
- /package/lib/{iconfont.1743045564244.ttf → iconfont.1743125678150.ttf} +0 -0
- /package/lib/{iconfont.1743045564244.woff → iconfont.1743125678150.woff} +0 -0
- /package/lib/{iconfont.1743045564244.woff2 → iconfont.1743125678150.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import XEUtils from 'xe-utils';
|
|
2
|
-
import {
|
|
2
|
+
import { getTpImg, isPx, isScale, hasClass, addClass, removeClass, getEventTargetNode, getPaddingTopBottomSize, getOffsetPos, setScrollTop, setScrollLeft, toCssUnit } from '../../ui/src/dom';
|
|
3
3
|
import { getLastZIndex, nextZIndex, hasChildrenList, getFuncText, isEnableConf, formatText, eqEmptyValue } from '../../ui/src/utils';
|
|
4
4
|
import { VxeUI } from '../../ui';
|
|
5
5
|
import Cell from './cell';
|
|
@@ -7,6 +7,7 @@ import { getRowUniqueId, clearTableAllStatus, getRowkey, getRowid, rowToVisible,
|
|
|
7
7
|
import { getSlotVNs } from '../../ui/src/vn';
|
|
8
8
|
import { warnLog, errLog } from '../../ui/src/log';
|
|
9
9
|
const { getConfig, getI18n, renderer, formats, interceptor, createEvent } = VxeUI;
|
|
10
|
+
const browseObj = XEUtils.browse();
|
|
10
11
|
const supportMaxRow = 5e6;
|
|
11
12
|
const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
12
13
|
const maxYHeight = 5e6;
|
|
@@ -614,7 +615,7 @@ function updateStyle($xeTable) {
|
|
|
614
615
|
if (tableElem) {
|
|
615
616
|
tableElem.style.width = tWidth ? `${tWidth}px` : '';
|
|
616
617
|
// 兼容性处理
|
|
617
|
-
tableElem.style.paddingRight = osbWidth && fixedType && (
|
|
618
|
+
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj['-moz'] || browseObj.safari) ? `${osbWidth}px` : '';
|
|
618
619
|
}
|
|
619
620
|
const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);
|
|
620
621
|
if (emptyBlockElem) {
|
|
@@ -1769,7 +1770,7 @@ function hideDropTip($xeTable) {
|
|
|
1769
1770
|
* @param {Event} evnt 事件
|
|
1770
1771
|
* @param {Row} row 行对象
|
|
1771
1772
|
*/
|
|
1772
|
-
function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
|
|
1773
|
+
function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
|
|
1773
1774
|
const reactData = $xeTable;
|
|
1774
1775
|
const tipOverEl = overflowElem || tdEl;
|
|
1775
1776
|
if (!tipOverEl) {
|
|
@@ -1783,7 +1784,8 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
|
|
|
1783
1784
|
const customContent = contentMethod ? contentMethod(params) : null;
|
|
1784
1785
|
const useCustom = contentMethod && !XEUtils.eqNull(customContent);
|
|
1785
1786
|
const content = useCustom ? customContent : XEUtils.toString(column.type === 'html' ? tipOverEl.innerText : tipOverEl.textContent).trim();
|
|
1786
|
-
|
|
1787
|
+
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
1788
|
+
if (content && (showAll || useCustom || isOver)) {
|
|
1787
1789
|
Object.assign(tooltipStore, {
|
|
1788
1790
|
row,
|
|
1789
1791
|
column,
|
|
@@ -1793,7 +1795,7 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
|
|
|
1793
1795
|
$xeTable.$nextTick(() => {
|
|
1794
1796
|
const $tooltip = $xeTable.$refs.refTooltip;
|
|
1795
1797
|
if ($tooltip && $tooltip.open) {
|
|
1796
|
-
$tooltip.open(tipOverEl, formatText(content));
|
|
1798
|
+
$tooltip.open(isOver ? tipOverEl : tipElem, formatText(content));
|
|
1797
1799
|
}
|
|
1798
1800
|
});
|
|
1799
1801
|
}
|
|
@@ -5540,7 +5542,7 @@ const Methods = {
|
|
|
5540
5542
|
return;
|
|
5541
5543
|
}
|
|
5542
5544
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
5543
|
-
handleTooltip($xeTable, evnt, thEl, thEl.querySelector('.vxe-cell--title') || cellEl, params);
|
|
5545
|
+
handleTooltip($xeTable, evnt, thEl, thEl.querySelector('.vxe-cell--wrapper'), thEl.querySelector('.vxe-cell--title') || cellEl, params);
|
|
5544
5546
|
}
|
|
5545
5547
|
},
|
|
5546
5548
|
/**
|
|
@@ -5570,7 +5572,7 @@ const Methods = {
|
|
|
5570
5572
|
}
|
|
5571
5573
|
}
|
|
5572
5574
|
if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
|
|
5573
|
-
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
5575
|
+
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
5574
5576
|
}
|
|
5575
5577
|
},
|
|
5576
5578
|
/**
|
|
@@ -5584,7 +5586,7 @@ const Methods = {
|
|
|
5584
5586
|
const tdEl = evnt.currentTarget;
|
|
5585
5587
|
handleTargetEnterEvent($xeTable, tooltipStore.column !== column || !!tooltipStore.row);
|
|
5586
5588
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
5587
|
-
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
5589
|
+
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
5588
5590
|
}
|
|
5589
5591
|
},
|
|
5590
5592
|
openTooltip(target, content) {
|
package/es/table/src/table.js
CHANGED
|
@@ -1130,6 +1130,9 @@ export default {
|
|
|
1130
1130
|
const $xeTable = this;
|
|
1131
1131
|
const $xeTabs = $xeTable.$xeTabs;
|
|
1132
1132
|
return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
|
|
1133
|
+
},
|
|
1134
|
+
computeVxeLanguage() {
|
|
1135
|
+
return VxeUI.getLanguage();
|
|
1133
1136
|
} }),
|
|
1134
1137
|
watch: {
|
|
1135
1138
|
data(value) {
|
|
@@ -1202,6 +1205,9 @@ export default {
|
|
|
1202
1205
|
computeScrollbarYToLeft() {
|
|
1203
1206
|
this.reLayoutFlag++;
|
|
1204
1207
|
},
|
|
1208
|
+
computeVxeLanguage() {
|
|
1209
|
+
this.reLayoutFlag++;
|
|
1210
|
+
},
|
|
1205
1211
|
reLayoutFlag() {
|
|
1206
1212
|
const $xeTable = this;
|
|
1207
1213
|
$xeTable.$nextTick(() => $xeTable.recalculate(true));
|
package/es/ui/index.js
CHANGED
package/es/ui/src/dom.js
CHANGED
package/es/ui/src/log.js
CHANGED
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.
|
|
2223
|
+
const version = "3.14.2";
|
|
2224
2224
|
core_.VxeUI.version = version;
|
|
2225
2225
|
core_.VxeUI.tableVersion = version;
|
|
2226
2226
|
core_.VxeUI.setConfig({
|
|
@@ -2661,7 +2661,6 @@ var es_array_push = __webpack_require__(4114);
|
|
|
2661
2661
|
;// CONCATENATED MODULE: ./packages/ui/src/dom.ts
|
|
2662
2662
|
|
|
2663
2663
|
const reClsMap = {};
|
|
2664
|
-
const browse = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
2665
2664
|
let tpImgEl;
|
|
2666
2665
|
function initTpImg() {
|
|
2667
2666
|
if (!tpImgEl) {
|
|
@@ -2844,7 +2843,7 @@ function isNodeElement(elem) {
|
|
|
2844
2843
|
const {
|
|
2845
2844
|
log: log_log
|
|
2846
2845
|
} = core_.VxeUI;
|
|
2847
|
-
const log_version = `table v${"3.14.
|
|
2846
|
+
const log_version = `table v${"3.14.2"}`;
|
|
2848
2847
|
const warnLog = log_log.create('warn', log_version);
|
|
2849
2848
|
const errLog = log_log.create('error', log_version);
|
|
2850
2849
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -5174,6 +5173,7 @@ const {
|
|
|
5174
5173
|
interceptor: methods_interceptor,
|
|
5175
5174
|
createEvent
|
|
5176
5175
|
} = core_.VxeUI;
|
|
5176
|
+
const browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
5177
5177
|
const supportMaxRow = 5e6;
|
|
5178
5178
|
const customStorageKey = 'VXE_CUSTOM_STORE';
|
|
5179
5179
|
const maxYHeight = 5e6;
|
|
@@ -5916,7 +5916,7 @@ function updateStyle($xeTable) {
|
|
|
5916
5916
|
if (tableElem) {
|
|
5917
5917
|
tableElem.style.width = tWidth ? `${tWidth}px` : '';
|
|
5918
5918
|
// 兼容性处理
|
|
5919
|
-
tableElem.style.paddingRight = osbWidth && fixedType && (
|
|
5919
|
+
tableElem.style.paddingRight = osbWidth && fixedType && (browseObj['-moz'] || browseObj.safari) ? `${osbWidth}px` : '';
|
|
5920
5920
|
}
|
|
5921
5921
|
const emptyBlockElem = getRefElem(elemStore[`${name}-${layout}-emptyBlock`]);
|
|
5922
5922
|
if (emptyBlockElem) {
|
|
@@ -7236,7 +7236,7 @@ function hideDropTip($xeTable) {
|
|
|
7236
7236
|
* @param {Event} evnt 事件
|
|
7237
7237
|
* @param {Row} row 行对象
|
|
7238
7238
|
*/
|
|
7239
|
-
function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
|
|
7239
|
+
function handleTooltip($xeTable, evnt, tdEl, overflowElem, tipElem, params) {
|
|
7240
7240
|
const reactData = $xeTable;
|
|
7241
7241
|
const tipOverEl = overflowElem || tdEl;
|
|
7242
7242
|
if (!tipOverEl) {
|
|
@@ -7258,7 +7258,8 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
|
|
|
7258
7258
|
const customContent = contentMethod ? contentMethod(params) : null;
|
|
7259
7259
|
const useCustom = contentMethod && !external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().eqNull(customContent);
|
|
7260
7260
|
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();
|
|
7261
|
-
|
|
7261
|
+
const isOver = tipOverEl.scrollWidth > tipOverEl.clientWidth;
|
|
7262
|
+
if (content && (showAll || useCustom || isOver)) {
|
|
7262
7263
|
Object.assign(tooltipStore, {
|
|
7263
7264
|
row,
|
|
7264
7265
|
column,
|
|
@@ -7268,7 +7269,7 @@ function handleTooltip($xeTable, evnt, tdEl, overflowElem, params) {
|
|
|
7268
7269
|
$xeTable.$nextTick(() => {
|
|
7269
7270
|
const $tooltip = $xeTable.$refs.refTooltip;
|
|
7270
7271
|
if ($tooltip && $tooltip.open) {
|
|
7271
|
-
$tooltip.open(tipOverEl, formatText(content));
|
|
7272
|
+
$tooltip.open(isOver ? tipOverEl : tipElem, formatText(content));
|
|
7272
7273
|
}
|
|
7273
7274
|
});
|
|
7274
7275
|
}
|
|
@@ -11579,7 +11580,7 @@ const Methods = {
|
|
|
11579
11580
|
return;
|
|
11580
11581
|
}
|
|
11581
11582
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
11582
|
-
handleTooltip($xeTable, evnt, thEl, thEl.querySelector('.vxe-cell--title') || cellEl, params);
|
|
11583
|
+
handleTooltip($xeTable, evnt, thEl, thEl.querySelector('.vxe-cell--wrapper'), thEl.querySelector('.vxe-cell--title') || cellEl, params);
|
|
11583
11584
|
}
|
|
11584
11585
|
},
|
|
11585
11586
|
/**
|
|
@@ -11620,7 +11621,7 @@ const Methods = {
|
|
|
11620
11621
|
}
|
|
11621
11622
|
}
|
|
11622
11623
|
if (tooltipStore.column !== column || tooltipStore.row !== row || !tooltipStore.visible) {
|
|
11623
|
-
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
11624
|
+
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
11624
11625
|
}
|
|
11625
11626
|
},
|
|
11626
11627
|
/**
|
|
@@ -11638,7 +11639,7 @@ const Methods = {
|
|
|
11638
11639
|
const tdEl = evnt.currentTarget;
|
|
11639
11640
|
handleTargetEnterEvent($xeTable, tooltipStore.column !== column || !!tooltipStore.row);
|
|
11640
11641
|
if (tooltipStore.column !== column || !tooltipStore.visible) {
|
|
11641
|
-
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
11642
|
+
handleTooltip($xeTable, evnt, tdEl, tdEl.querySelector('.vxe-cell--wrapper'), tdEl.querySelector('.vxe-cell--label') || tdEl.querySelector('.vxe-cell--wrapper'), params);
|
|
11642
11643
|
}
|
|
11643
11644
|
},
|
|
11644
11645
|
openTooltip(target, content) {
|
|
@@ -21119,6 +21120,7 @@ const {
|
|
|
21119
21120
|
renderer: edit_mixin_renderer,
|
|
21120
21121
|
getI18n: mixin_getI18n
|
|
21121
21122
|
} = core_.VxeUI;
|
|
21123
|
+
const mixin_browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
21122
21124
|
function getEditColumnModel(row, column) {
|
|
21123
21125
|
const {
|
|
21124
21126
|
model,
|
|
@@ -22165,7 +22167,7 @@ function handleEditCell($xeTable, row, fieldOrColumn, isPos) {
|
|
|
22165
22167
|
inputElem.select();
|
|
22166
22168
|
} else {
|
|
22167
22169
|
// 保持一致行为,光标移到末端
|
|
22168
|
-
if (
|
|
22170
|
+
if (mixin_browseObj.msie) {
|
|
22169
22171
|
const textRange = inputElem.createTextRange();
|
|
22170
22172
|
textRange.collapse(false);
|
|
22171
22173
|
textRange.select();
|
|
@@ -24295,10 +24297,11 @@ const convertToRows = originColumns => {
|
|
|
24295
24297
|
|
|
24296
24298
|
|
|
24297
24299
|
|
|
24300
|
+
const keyboard_mixin_browseObj = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().browse();
|
|
24298
24301
|
function getTargetOffset(target, container) {
|
|
24299
24302
|
let offsetTop = 0;
|
|
24300
24303
|
let offsetLeft = 0;
|
|
24301
|
-
const triggerCheckboxLabel = !
|
|
24304
|
+
const triggerCheckboxLabel = !keyboard_mixin_browseObj.firefox && hasClass(target, 'vxe-checkbox--label');
|
|
24302
24305
|
if (triggerCheckboxLabel) {
|
|
24303
24306
|
const checkboxLabelStyle = getComputedStyle(target);
|
|
24304
24307
|
offsetTop -= external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(checkboxLabelStyle.paddingTop);
|
|
@@ -26993,6 +26996,9 @@ function renderBody(h, $xeTable) {
|
|
|
26993
26996
|
const $xeTable = this;
|
|
26994
26997
|
const $xeTabs = $xeTable.$xeTabs;
|
|
26995
26998
|
return $xeTabs ? $xeTabs.reactData.resizeFlag : null;
|
|
26999
|
+
},
|
|
27000
|
+
computeVxeLanguage() {
|
|
27001
|
+
return core_.VxeUI.getLanguage();
|
|
26996
27002
|
}
|
|
26997
27003
|
},
|
|
26998
27004
|
watch: {
|
|
@@ -27072,6 +27078,9 @@ function renderBody(h, $xeTable) {
|
|
|
27072
27078
|
computeScrollbarYToLeft() {
|
|
27073
27079
|
this.reLayoutFlag++;
|
|
27074
27080
|
},
|
|
27081
|
+
computeVxeLanguage() {
|
|
27082
|
+
this.reLayoutFlag++;
|
|
27083
|
+
},
|
|
27075
27084
|
reLayoutFlag() {
|
|
27076
27085
|
const $xeTable = this;
|
|
27077
27086
|
$xeTable.$nextTick(() => $xeTable.recalculate(true));
|