vxe-table 3.17.6 → 3.17.7
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 +38 -6
- package/es/table/src/table.js +5 -11
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/lib/index.umd.js +51 -19
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/table/src/methods.js +44 -6
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/table.js +5 -11
- 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 +39 -6
- package/packages/table/src/table.ts +5 -13
- package/styles/cssvar.scss +0 -2
- /package/es/{iconfont.1754534807189.ttf → iconfont.1754614978390.ttf} +0 -0
- /package/es/{iconfont.1754534807189.woff → iconfont.1754614978390.woff} +0 -0
- /package/es/{iconfont.1754534807189.woff2 → iconfont.1754614978390.woff2} +0 -0
- /package/lib/{iconfont.1754534807189.ttf → iconfont.1754614978390.ttf} +0 -0
- /package/lib/{iconfont.1754534807189.woff → iconfont.1754614978390.woff} +0 -0
- /package/lib/{iconfont.1754534807189.woff2 → iconfont.1754614978390.woff2} +0 -0
package/es/table/src/methods.js
CHANGED
|
@@ -2249,12 +2249,17 @@ function autoCellWidth($xeTable) {
|
|
|
2249
2249
|
const calcCellAutoHeight = (rowRest, wrapperEl) => {
|
|
2250
2250
|
const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);
|
|
2251
2251
|
let colHeight = rowRest.height;
|
|
2252
|
+
let firstCellStyle = null;
|
|
2253
|
+
let topBottomPadding = 0;
|
|
2252
2254
|
for (let i = 0; i < cellElemList.length; i++) {
|
|
2253
|
-
const
|
|
2254
|
-
const
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2255
|
+
const wrapperElem = cellElemList[i];
|
|
2256
|
+
const cellElem = wrapperElem.parentElement;
|
|
2257
|
+
if (!firstCellStyle) {
|
|
2258
|
+
firstCellStyle = getComputedStyle(cellElem);
|
|
2259
|
+
topBottomPadding = firstCellStyle ? Math.ceil(XEUtils.toNumber(firstCellStyle.paddingTop) + XEUtils.toNumber(firstCellStyle.paddingBottom)) : 0;
|
|
2260
|
+
}
|
|
2261
|
+
const cellHeight = wrapperElem ? wrapperElem.clientHeight : 0;
|
|
2262
|
+
colHeight = Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding));
|
|
2258
2263
|
}
|
|
2259
2264
|
return colHeight;
|
|
2260
2265
|
};
|
|
@@ -5569,11 +5574,13 @@ const Methods = {
|
|
|
5569
5574
|
},
|
|
5570
5575
|
handleRowResizeMousedownEvent(evnt, params) {
|
|
5571
5576
|
const $xeTable = this;
|
|
5577
|
+
const props = $xeTable;
|
|
5572
5578
|
const reactData = $xeTable;
|
|
5573
5579
|
const internalData = $xeTable;
|
|
5574
5580
|
evnt.stopPropagation();
|
|
5575
5581
|
evnt.preventDefault();
|
|
5576
5582
|
const { row } = params;
|
|
5583
|
+
const { showOverflow } = props;
|
|
5577
5584
|
const { overflowX, scrollbarWidth, overflowY, scrollbarHeight } = reactData;
|
|
5578
5585
|
const { elemStore, fullAllDataRowIdData } = internalData;
|
|
5579
5586
|
const osbWidth = overflowY ? scrollbarWidth : 0;
|
|
@@ -5602,7 +5609,10 @@ const Methods = {
|
|
|
5602
5609
|
return;
|
|
5603
5610
|
}
|
|
5604
5611
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
5605
|
-
|
|
5612
|
+
let currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
5613
|
+
if (!showOverflow) {
|
|
5614
|
+
currCellHeight = tdEl.clientHeight;
|
|
5615
|
+
}
|
|
5606
5616
|
const tableRect = tableEl.getBoundingClientRect();
|
|
5607
5617
|
const trRect = trEl.getBoundingClientRect();
|
|
5608
5618
|
const targetOffsetY = dragClientY - trRect.y - trEl.clientHeight;
|
|
@@ -5766,6 +5776,28 @@ const Methods = {
|
|
|
5766
5776
|
});
|
|
5767
5777
|
return rest;
|
|
5768
5778
|
},
|
|
5779
|
+
recalcRowHeight(rowOrId) {
|
|
5780
|
+
const $xeTable = this;
|
|
5781
|
+
const reactData = $xeTable;
|
|
5782
|
+
const internalData = $xeTable;
|
|
5783
|
+
const { fullAllDataRowIdData } = internalData;
|
|
5784
|
+
const rows = XEUtils.isArray(rowOrId) ? rowOrId : [rowOrId];
|
|
5785
|
+
const el = $xeTable.$refs.refElem;
|
|
5786
|
+
if (el) {
|
|
5787
|
+
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
5788
|
+
el.setAttribute('data-calc-row', 'Y');
|
|
5789
|
+
rows.forEach(row => {
|
|
5790
|
+
const rowid = XEUtils.isString(row) || XEUtils.isNumber(row) ? row : handleGetRowId(row);
|
|
5791
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
5792
|
+
if (rowRest) {
|
|
5793
|
+
rowRest.resizeHeight = calcCellAutoHeight(rowRest, el);
|
|
5794
|
+
}
|
|
5795
|
+
el.removeAttribute('data-calc-row');
|
|
5796
|
+
});
|
|
5797
|
+
reactData.calcCellHeightFlag++;
|
|
5798
|
+
}
|
|
5799
|
+
return $xeTable.$nextTick();
|
|
5800
|
+
},
|
|
5769
5801
|
setRowHeight(rowOrId, height) {
|
|
5770
5802
|
const $xeTable = this;
|
|
5771
5803
|
const reactData = $xeTable;
|
package/es/table/src/table.js
CHANGED
|
@@ -1313,25 +1313,19 @@ export default {
|
|
|
1313
1313
|
this.$nextTick().then(() => this.refreshColumn());
|
|
1314
1314
|
},
|
|
1315
1315
|
computeSize() {
|
|
1316
|
-
this.
|
|
1316
|
+
this.reLayoutFlag++;
|
|
1317
1317
|
},
|
|
1318
1318
|
showHeader() {
|
|
1319
|
-
this.
|
|
1319
|
+
this.reLayoutFlag++;
|
|
1320
1320
|
},
|
|
1321
1321
|
showFooter() {
|
|
1322
|
-
this.
|
|
1322
|
+
this.reLayoutFlag++;
|
|
1323
1323
|
},
|
|
1324
1324
|
overflowX() {
|
|
1325
|
-
this.
|
|
1325
|
+
this.reLayoutFlag++;
|
|
1326
1326
|
},
|
|
1327
1327
|
overflowY() {
|
|
1328
|
-
this.
|
|
1329
|
-
},
|
|
1330
|
-
reScrollFlag() {
|
|
1331
|
-
const $xeTable = this;
|
|
1332
|
-
$xeTable.$nextTick(() => {
|
|
1333
|
-
$xeTable.recalculate(true).then(() => $xeTable.refreshScroll());
|
|
1334
|
-
});
|
|
1328
|
+
this.reLayoutFlag++;
|
|
1335
1329
|
},
|
|
1336
1330
|
height() {
|
|
1337
1331
|
this.reLayoutFlag++;
|
package/es/ui/index.js
CHANGED
package/es/ui/src/log.js
CHANGED
package/lib/index.umd.js
CHANGED
|
@@ -2002,7 +2002,7 @@ function getClass(property, params) {
|
|
|
2002
2002
|
;// CONCATENATED MODULE: ./packages/ui/index.ts
|
|
2003
2003
|
|
|
2004
2004
|
|
|
2005
|
-
const version = "3.17.
|
|
2005
|
+
const version = "3.17.7";
|
|
2006
2006
|
core_.VxeUI.version = version;
|
|
2007
2007
|
core_.VxeUI.tableVersion = version;
|
|
2008
2008
|
core_.VxeUI.setConfig({
|
|
@@ -2669,7 +2669,7 @@ function isNodeElement(elem) {
|
|
|
2669
2669
|
const {
|
|
2670
2670
|
log: log_log
|
|
2671
2671
|
} = core_.VxeUI;
|
|
2672
|
-
const log_version = `table v${"3.17.
|
|
2672
|
+
const log_version = `table v${"3.17.7"}`;
|
|
2673
2673
|
const warnLog = log_log.create('warn', log_version);
|
|
2674
2674
|
const errLog = log_log.create('error', log_version);
|
|
2675
2675
|
;// CONCATENATED MODULE: ./packages/table/src/columnInfo.ts
|
|
@@ -8109,12 +8109,17 @@ function autoCellWidth($xeTable) {
|
|
|
8109
8109
|
const calcCellAutoHeight = (rowRest, wrapperEl) => {
|
|
8110
8110
|
const cellElemList = wrapperEl.querySelectorAll(`.vxe-cell--wrapper[rowid="${rowRest.rowid}"]`);
|
|
8111
8111
|
let colHeight = rowRest.height;
|
|
8112
|
+
let firstCellStyle = null;
|
|
8113
|
+
let topBottomPadding = 0;
|
|
8112
8114
|
for (let i = 0; i < cellElemList.length; i++) {
|
|
8113
|
-
const
|
|
8114
|
-
const
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8115
|
+
const wrapperElem = cellElemList[i];
|
|
8116
|
+
const cellElem = wrapperElem.parentElement;
|
|
8117
|
+
if (!firstCellStyle) {
|
|
8118
|
+
firstCellStyle = getComputedStyle(cellElem);
|
|
8119
|
+
topBottomPadding = firstCellStyle ? Math.ceil(external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingTop) + external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().toNumber(firstCellStyle.paddingBottom)) : 0;
|
|
8120
|
+
}
|
|
8121
|
+
const cellHeight = wrapperElem ? wrapperElem.clientHeight : 0;
|
|
8122
|
+
colHeight = Math.max(colHeight, Math.ceil(cellHeight + topBottomPadding));
|
|
8118
8123
|
}
|
|
8119
8124
|
return colHeight;
|
|
8120
8125
|
};
|
|
@@ -11913,6 +11918,7 @@ const Methods = {
|
|
|
11913
11918
|
},
|
|
11914
11919
|
handleRowResizeMousedownEvent(evnt, params) {
|
|
11915
11920
|
const $xeTable = this;
|
|
11921
|
+
const props = $xeTable;
|
|
11916
11922
|
const reactData = $xeTable;
|
|
11917
11923
|
const internalData = $xeTable;
|
|
11918
11924
|
evnt.stopPropagation();
|
|
@@ -11920,6 +11926,9 @@ const Methods = {
|
|
|
11920
11926
|
const {
|
|
11921
11927
|
row
|
|
11922
11928
|
} = params;
|
|
11929
|
+
const {
|
|
11930
|
+
showOverflow
|
|
11931
|
+
} = props;
|
|
11923
11932
|
const {
|
|
11924
11933
|
overflowX,
|
|
11925
11934
|
scrollbarWidth,
|
|
@@ -11958,7 +11967,10 @@ const Methods = {
|
|
|
11958
11967
|
return;
|
|
11959
11968
|
}
|
|
11960
11969
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
11961
|
-
|
|
11970
|
+
let currCellHeight = rowRest.resizeHeight || cellOpts.height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
11971
|
+
if (!showOverflow) {
|
|
11972
|
+
currCellHeight = tdEl.clientHeight;
|
|
11973
|
+
}
|
|
11962
11974
|
const tableRect = tableEl.getBoundingClientRect();
|
|
11963
11975
|
const trRect = trEl.getBoundingClientRect();
|
|
11964
11976
|
const targetOffsetY = dragClientY - trRect.y - trEl.clientHeight;
|
|
@@ -12145,6 +12157,32 @@ const Methods = {
|
|
|
12145
12157
|
});
|
|
12146
12158
|
return rest;
|
|
12147
12159
|
},
|
|
12160
|
+
recalcRowHeight(rowOrId) {
|
|
12161
|
+
const $xeTable = this;
|
|
12162
|
+
const reactData = $xeTable;
|
|
12163
|
+
const internalData = $xeTable;
|
|
12164
|
+
const {
|
|
12165
|
+
fullAllDataRowIdData
|
|
12166
|
+
} = internalData;
|
|
12167
|
+
const rows = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isArray(rowOrId) ? rowOrId : [rowOrId];
|
|
12168
|
+
const el = $xeTable.$refs.refElem;
|
|
12169
|
+
if (el) {
|
|
12170
|
+
const {
|
|
12171
|
+
handleGetRowId
|
|
12172
|
+
} = createHandleGetRowId($xeTable);
|
|
12173
|
+
el.setAttribute('data-calc-row', 'Y');
|
|
12174
|
+
rows.forEach(row => {
|
|
12175
|
+
const rowid = external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isString(row) || external_root_XEUtils_commonjs_xe_utils_commonjs2_xe_utils_amd_xe_utils_default().isNumber(row) ? row : handleGetRowId(row);
|
|
12176
|
+
const rowRest = fullAllDataRowIdData[rowid];
|
|
12177
|
+
if (rowRest) {
|
|
12178
|
+
rowRest.resizeHeight = calcCellAutoHeight(rowRest, el);
|
|
12179
|
+
}
|
|
12180
|
+
el.removeAttribute('data-calc-row');
|
|
12181
|
+
});
|
|
12182
|
+
reactData.calcCellHeightFlag++;
|
|
12183
|
+
}
|
|
12184
|
+
return $xeTable.$nextTick();
|
|
12185
|
+
},
|
|
12148
12186
|
setRowHeight(rowOrId, height) {
|
|
12149
12187
|
const $xeTable = this;
|
|
12150
12188
|
const reactData = $xeTable;
|
|
@@ -29679,25 +29717,19 @@ function renderBody(h, $xeTable) {
|
|
|
29679
29717
|
this.$nextTick().then(() => this.refreshColumn());
|
|
29680
29718
|
},
|
|
29681
29719
|
computeSize() {
|
|
29682
|
-
this.
|
|
29720
|
+
this.reLayoutFlag++;
|
|
29683
29721
|
},
|
|
29684
29722
|
showHeader() {
|
|
29685
|
-
this.
|
|
29723
|
+
this.reLayoutFlag++;
|
|
29686
29724
|
},
|
|
29687
29725
|
showFooter() {
|
|
29688
|
-
this.
|
|
29726
|
+
this.reLayoutFlag++;
|
|
29689
29727
|
},
|
|
29690
29728
|
overflowX() {
|
|
29691
|
-
this.
|
|
29729
|
+
this.reLayoutFlag++;
|
|
29692
29730
|
},
|
|
29693
29731
|
overflowY() {
|
|
29694
|
-
this.
|
|
29695
|
-
},
|
|
29696
|
-
reScrollFlag() {
|
|
29697
|
-
const $xeTable = this;
|
|
29698
|
-
$xeTable.$nextTick(() => {
|
|
29699
|
-
$xeTable.recalculate(true).then(() => $xeTable.refreshScroll());
|
|
29700
|
-
});
|
|
29732
|
+
this.reLayoutFlag++;
|
|
29701
29733
|
},
|
|
29702
29734
|
height() {
|
|
29703
29735
|
this.reLayoutFlag++;
|