vxe-table 3.23.0-beta.7 → 3.23.1
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/index.css +1 -1
- package/es/index.min.css +1 -1
- package/es/style.css +1 -1
- package/es/style.min.css +1 -1
- package/es/table/module/export/mixin.js +10 -9
- package/es/table/src/methods.js +7 -6
- package/es/table/src/util.js +2 -2
- package/es/table/style.css +3 -1
- package/es/table/style.min.css +1 -1
- package/es/ui/index.js +1 -1
- package/es/ui/src/log.js +1 -1
- package/es/vxe-table/style.css +3 -1
- package/es/vxe-table/style.min.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.min.css +1 -1
- package/lib/index.umd.js +28 -18
- package/lib/index.umd.min.js +1 -1
- package/lib/style.css +1 -1
- package/lib/style.min.css +1 -1
- package/lib/table/module/export/mixin.js +19 -9
- package/lib/table/module/export/mixin.min.js +1 -1
- package/lib/table/src/methods.js +5 -5
- package/lib/table/src/methods.min.js +1 -1
- package/lib/table/src/util.js +2 -2
- package/lib/table/src/util.min.js +1 -1
- package/lib/table/style/style.css +3 -1
- package/lib/table/style/style.min.css +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/lib/vxe-table/style/style.css +3 -1
- package/lib/vxe-table/style/style.min.css +1 -1
- package/package.json +2 -2
- package/packages/table/module/export/mixin.ts +10 -9
- package/packages/table/src/methods.ts +7 -6
- package/packages/table/src/util.ts +2 -2
- package/styles/components/table.scss +3 -1
- /package/es/{iconfont.1787383485465.ttf → iconfont.1787542588120.ttf} +0 -0
- /package/es/{iconfont.1787383485465.woff → iconfont.1787542588120.woff} +0 -0
- /package/es/{iconfont.1787383485465.woff2 → iconfont.1787542588120.woff2} +0 -0
- /package/lib/{iconfont.1787383485465.ttf → iconfont.1787542588120.ttf} +0 -0
- /package/lib/{iconfont.1787383485465.woff → iconfont.1787542588120.woff} +0 -0
- /package/lib/{iconfont.1787383485465.woff2 → iconfont.1787542588120.woff2} +0 -0
|
@@ -1040,7 +1040,7 @@ function handleImport($xeTable, content, opts) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
VxeUI.modal.message({ content: getI18n('vxe.error.impFields'), status: 'error' });
|
|
1042
1042
|
if (_importReject) {
|
|
1043
|
-
_importReject({ status: false });
|
|
1043
|
+
_importReject({ status: false, msg: 'field mismatching' });
|
|
1044
1044
|
}
|
|
1045
1045
|
}
|
|
1046
1046
|
}
|
|
@@ -1058,7 +1058,7 @@ function handleFileImport($xeTable, file, opts) {
|
|
|
1058
1058
|
}
|
|
1059
1059
|
VxeUI.modal.message({ content: getI18n('vxe.error.notType', [type]), status: 'error' });
|
|
1060
1060
|
}
|
|
1061
|
-
const params = { status: false };
|
|
1061
|
+
const params = { status: false, msg: 'type error' };
|
|
1062
1062
|
return Promise.reject(params);
|
|
1063
1063
|
}
|
|
1064
1064
|
const rest = new Promise((resolve, reject) => {
|
|
@@ -1094,7 +1094,7 @@ function handleFileImport($xeTable, file, opts) {
|
|
|
1094
1094
|
const reader = new FileReader();
|
|
1095
1095
|
reader.onerror = () => {
|
|
1096
1096
|
errLog('vxe.error.notType', [type]);
|
|
1097
|
-
_importReject({ status: false });
|
|
1097
|
+
_importReject({ status: false, msg: 'reading file error' });
|
|
1098
1098
|
};
|
|
1099
1099
|
reader.onload = (e) => {
|
|
1100
1100
|
handleImport($xeTable, e.target.result, options);
|
|
@@ -1106,7 +1106,7 @@ function handleFileImport($xeTable, file, opts) {
|
|
|
1106
1106
|
else {
|
|
1107
1107
|
// 不支持的浏览器
|
|
1108
1108
|
errLog('vxe.error.notExp');
|
|
1109
|
-
_importResolve({ status:
|
|
1109
|
+
_importResolve({ status: false, msg: 'unsupported browser' });
|
|
1110
1110
|
}
|
|
1111
1111
|
});
|
|
1112
1112
|
return rest.then(() => {
|
|
@@ -1581,7 +1581,7 @@ export default {
|
|
|
1581
1581
|
if (['xlsx', 'pdf'].includes(type)) {
|
|
1582
1582
|
warnLog('vxe.error.reqPlugin', [3, 'plugin-export-xlsx']);
|
|
1583
1583
|
}
|
|
1584
|
-
const params = { status: false };
|
|
1584
|
+
const params = { status: false, msg: 'type error' };
|
|
1585
1585
|
return Promise.reject(params);
|
|
1586
1586
|
}
|
|
1587
1587
|
if (!handleOptions.print) {
|
|
@@ -1589,7 +1589,7 @@ export default {
|
|
|
1589
1589
|
const beRest = beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
1590
1590
|
if (XEUtils.isBoolean(beRest)) {
|
|
1591
1591
|
if (!beRest) {
|
|
1592
|
-
const params = { status: false };
|
|
1592
|
+
const params = { status: false, msg: 'before prevent' };
|
|
1593
1593
|
return Promise.reject(params);
|
|
1594
1594
|
}
|
|
1595
1595
|
}
|
|
@@ -1706,7 +1706,7 @@ export default {
|
|
|
1706
1706
|
const biRest = beforeImportMethod({ options: opts, $table: $xeTable });
|
|
1707
1707
|
if (XEUtils.isBoolean(biRest)) {
|
|
1708
1708
|
if (!biRest) {
|
|
1709
|
-
const params = { status: false };
|
|
1709
|
+
const params = { status: false, mas: 'before prevent' };
|
|
1710
1710
|
return Promise.reject(params);
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
@@ -1729,7 +1729,7 @@ export default {
|
|
|
1729
1729
|
const biRest = beforeImportMethod({ options: opts, $table: $xeTable });
|
|
1730
1730
|
if (XEUtils.isBoolean(biRest)) {
|
|
1731
1731
|
if (!biRest) {
|
|
1732
|
-
const params = { status: false };
|
|
1732
|
+
const params = { status: false, mas: 'before prevent' };
|
|
1733
1733
|
return Promise.reject(params);
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
@@ -1880,7 +1880,8 @@ export default {
|
|
|
1880
1880
|
}
|
|
1881
1881
|
}
|
|
1882
1882
|
else {
|
|
1883
|
-
|
|
1883
|
+
errLog('vxe.error.reqComp', ['vxe-print']);
|
|
1884
|
+
const e = { status: false, msg: 'print not exist' };
|
|
1884
1885
|
reject(e);
|
|
1885
1886
|
}
|
|
1886
1887
|
});
|
package/es/table/src/methods.js
CHANGED
|
@@ -2536,9 +2536,10 @@ const calcCellHeight = ($xeTable) => {
|
|
|
2536
2536
|
if (!el || !el.clientWidth) {
|
|
2537
2537
|
return;
|
|
2538
2538
|
}
|
|
2539
|
+
const cellOpts = $xeTable.computeCellOpts;
|
|
2539
2540
|
const treeOpts = $xeTable.computeTreeOpts;
|
|
2540
2541
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
2541
|
-
if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
2542
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad || cellOpts.maxHeight || (treeConfig && treeOpts.showLine))) {
|
|
2542
2543
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
2543
2544
|
el.setAttribute('data-calc-row', 'Y');
|
|
2544
2545
|
tableData.forEach(row => {
|
|
@@ -4283,7 +4284,7 @@ function updateRowOffsetTop($xeTable) {
|
|
|
4283
4284
|
const rowid = handleGetRowId(row);
|
|
4284
4285
|
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
4285
4286
|
rowRest.oTop = offsetTop;
|
|
4286
|
-
offsetTop += rowRest
|
|
4287
|
+
offsetTop += getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
4287
4288
|
// 是否展开行
|
|
4288
4289
|
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
4289
4290
|
offsetTop += rowRest.expandHeight || expandOpts.height || 0;
|
|
@@ -4325,7 +4326,7 @@ function updateRowExpandStyle($xeTable) {
|
|
|
4325
4326
|
offsetTop = trEl.offsetTop + trEl.offsetHeight;
|
|
4326
4327
|
}
|
|
4327
4328
|
else {
|
|
4328
|
-
offsetTop = rowRest.oTop + (rowRest
|
|
4329
|
+
offsetTop = rowRest.oTop + getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
4329
4330
|
}
|
|
4330
4331
|
}
|
|
4331
4332
|
else {
|
|
@@ -7097,7 +7098,7 @@ const tableMethods = {
|
|
|
7097
7098
|
return;
|
|
7098
7099
|
}
|
|
7099
7100
|
const defaultRowHeight = $xeTable.computeDefaultRowHeight;
|
|
7100
|
-
let currCellHeight = rowRest
|
|
7101
|
+
let currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
7101
7102
|
if (!showOverflow) {
|
|
7102
7103
|
currCellHeight = tdEl.clientHeight;
|
|
7103
7104
|
}
|
|
@@ -7262,7 +7263,7 @@ const tableMethods = {
|
|
|
7262
7263
|
if (rowRest) {
|
|
7263
7264
|
const resizeHeight = rowRest.resizeHeight;
|
|
7264
7265
|
if (resizeHeight || isFull) {
|
|
7265
|
-
const currCellHeight =
|
|
7266
|
+
const currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
7266
7267
|
rest[rowid] = currCellHeight;
|
|
7267
7268
|
}
|
|
7268
7269
|
}
|
|
@@ -7334,7 +7335,7 @@ const tableMethods = {
|
|
|
7334
7335
|
const rowid = XEUtils.isString(rowOrId) || XEUtils.isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
|
|
7335
7336
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
7336
7337
|
if (rowRest) {
|
|
7337
|
-
return rowRest
|
|
7338
|
+
return getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
7338
7339
|
}
|
|
7339
7340
|
return 0;
|
|
7340
7341
|
},
|
package/es/table/src/util.js
CHANGED
|
@@ -672,10 +672,10 @@ export function handleRowidOrRow($xeTable, rowidOrRow) {
|
|
|
672
672
|
export function getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) {
|
|
673
673
|
const { height, minHeight, maxHeight } = cellOpts;
|
|
674
674
|
let cellHeight = rowRest.resizeHeight || height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
675
|
-
if (maxHeight && maxHeight
|
|
675
|
+
if (maxHeight && maxHeight <= cellHeight) {
|
|
676
676
|
cellHeight = maxHeight;
|
|
677
677
|
}
|
|
678
|
-
if (minHeight && minHeight
|
|
678
|
+
if (minHeight && minHeight >= cellHeight) {
|
|
679
679
|
cellHeight = minHeight;
|
|
680
680
|
}
|
|
681
681
|
return cellHeight;
|
package/es/table/style.css
CHANGED
|
@@ -3618,7 +3618,6 @@
|
|
|
3618
3618
|
.vxe-table--render-default .vxe-body--column > .vxe-cell {
|
|
3619
3619
|
display: flex;
|
|
3620
3620
|
flex-direction: row;
|
|
3621
|
-
align-items: center;
|
|
3622
3621
|
}
|
|
3623
3622
|
.vxe-table--render-default {
|
|
3624
3623
|
/*溢出列*/
|
|
@@ -4020,6 +4019,9 @@
|
|
|
4020
4019
|
.vxe-table--render-default.vxe-editable .vxe-body--column {
|
|
4021
4020
|
padding: 0;
|
|
4022
4021
|
}
|
|
4022
|
+
.vxe-table--render-default .vxe-cell--wrapper {
|
|
4023
|
+
margin: auto 0;
|
|
4024
|
+
}
|
|
4023
4025
|
.vxe-table--render-default .vxe-body--row .vxe-table--column .vxe-cell .vxe-cell--wrapper > .vxe-reusekeep-control {
|
|
4024
4026
|
position: absolute;
|
|
4025
4027
|
width: 0;
|