vxe-table 4.21.0-beta.7 → 4.21.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/dist/all.esm.js +21 -19
- package/dist/style.css +1 -1
- package/dist/style.min.css +1 -1
- 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/hook.js +10 -9
- package/es/table/src/table.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/hook.js +19 -9
- package/lib/table/module/export/hook.min.js +1 -1
- package/lib/table/src/table.js +5 -5
- package/lib/table/src/table.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/hook.ts +10 -9
- package/packages/table/src/table.ts +7 -6
- package/packages/table/src/util.ts +2 -2
- package/styles/components/table.scss +3 -1
- /package/es/{iconfont.1787383502391.ttf → iconfont.1787542597284.ttf} +0 -0
- /package/es/{iconfont.1787383502391.woff → iconfont.1787542597284.woff} +0 -0
- /package/es/{iconfont.1787383502391.woff2 → iconfont.1787542597284.woff2} +0 -0
- /package/lib/{iconfont.1787383502391.ttf → iconfont.1787542597284.ttf} +0 -0
- /package/lib/{iconfont.1787383502391.woff → iconfont.1787542597284.woff} +0 -0
- /package/lib/{iconfont.1787383502391.woff2 → iconfont.1787542597284.woff2} +0 -0
package/dist/all.esm.js
CHANGED
|
@@ -47,7 +47,7 @@ function getDefaultConfig(val1, def1) {
|
|
|
47
47
|
return XEUtils.eqNull(val1) ? def1 : val1;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
const version = "4.21.
|
|
50
|
+
const version = "4.21.1";
|
|
51
51
|
VxeUI.version = version;
|
|
52
52
|
VxeUI.tableVersion = version;
|
|
53
53
|
VxeUI.setConfig({
|
|
@@ -769,7 +769,7 @@ function wheelScrollTopTo(diffNum, cb) {
|
|
|
769
769
|
}
|
|
770
770
|
|
|
771
771
|
const { log } = VxeUI;
|
|
772
|
-
const tableVersion = `table v${"4.21.
|
|
772
|
+
const tableVersion = `table v${"4.21.1"}`;
|
|
773
773
|
function createComponentLog(name) {
|
|
774
774
|
const uiVersion = VxeUI.uiVersion ? `ui v${VxeUI.uiVersion}` : '';
|
|
775
775
|
const ganttVersion = VxeUI.ganttVersion ? `gantt v${VxeUI.ganttVersion}` : '';
|
|
@@ -1623,10 +1623,10 @@ function handleRowidOrRow($xeTable, rowidOrRow) {
|
|
|
1623
1623
|
function getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight) {
|
|
1624
1624
|
const { height, minHeight, maxHeight } = cellOpts;
|
|
1625
1625
|
let cellHeight = rowRest.resizeHeight || height || rowOpts.height || rowRest.height || defaultRowHeight;
|
|
1626
|
-
if (maxHeight && maxHeight
|
|
1626
|
+
if (maxHeight && maxHeight <= cellHeight) {
|
|
1627
1627
|
cellHeight = maxHeight;
|
|
1628
1628
|
}
|
|
1629
|
-
if (minHeight && minHeight
|
|
1629
|
+
if (minHeight && minHeight >= cellHeight) {
|
|
1630
1630
|
cellHeight = minHeight;
|
|
1631
1631
|
}
|
|
1632
1632
|
return cellHeight;
|
|
@@ -11628,7 +11628,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11628
11628
|
VxeUI.modal.message({ content: getI18n$4('vxe.error.impFields'), status: 'error' });
|
|
11629
11629
|
}
|
|
11630
11630
|
if (_importReject) {
|
|
11631
|
-
_importReject({ status: false });
|
|
11631
|
+
_importReject({ status: false, msg: 'field mismatching' });
|
|
11632
11632
|
}
|
|
11633
11633
|
}
|
|
11634
11634
|
};
|
|
@@ -11643,7 +11643,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11643
11643
|
VxeUI.modal.message({ content: getI18n$4('vxe.error.notType', [type]), status: 'error' });
|
|
11644
11644
|
}
|
|
11645
11645
|
}
|
|
11646
|
-
const params = { status: false };
|
|
11646
|
+
const params = { status: false, msg: 'type error' };
|
|
11647
11647
|
return Promise.reject(params);
|
|
11648
11648
|
}
|
|
11649
11649
|
const rest = new Promise((resolve, reject) => {
|
|
@@ -11679,7 +11679,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11679
11679
|
const reader = new FileReader();
|
|
11680
11680
|
reader.onerror = () => {
|
|
11681
11681
|
errLog$5('vxe.error.notType', [type]);
|
|
11682
|
-
_importReject({ status: false });
|
|
11682
|
+
_importReject({ status: false, msg: 'reading file error' });
|
|
11683
11683
|
};
|
|
11684
11684
|
reader.onload = (e) => {
|
|
11685
11685
|
handleImport(e.target.result, options);
|
|
@@ -11691,7 +11691,7 @@ hooks$4.add('tableExportModule', {
|
|
|
11691
11691
|
else {
|
|
11692
11692
|
// 不支持的浏览器
|
|
11693
11693
|
errLog$5('vxe.error.notExp');
|
|
11694
|
-
_importResolve({ status:
|
|
11694
|
+
_importResolve({ status: false, msg: 'unsupported browser' });
|
|
11695
11695
|
}
|
|
11696
11696
|
});
|
|
11697
11697
|
return rest.then(() => {
|
|
@@ -12104,7 +12104,7 @@ hooks$4.add('tableExportModule', {
|
|
|
12104
12104
|
if (['xlsx', 'pdf'].includes(type)) {
|
|
12105
12105
|
warnLog$4('vxe.error.reqPlugin', [4, 'plugin-export-xlsx']);
|
|
12106
12106
|
}
|
|
12107
|
-
const params = { status: false };
|
|
12107
|
+
const params = { status: false, msg: 'type error' };
|
|
12108
12108
|
return Promise.reject(params);
|
|
12109
12109
|
}
|
|
12110
12110
|
if (!handleOptions.print) {
|
|
@@ -12112,7 +12112,7 @@ hooks$4.add('tableExportModule', {
|
|
|
12112
12112
|
const beRest = beforeExportMethod({ options: handleOptions, $table: $xeTable, $grid: $xeGrid, $gantt: $xeGantt });
|
|
12113
12113
|
if (XEUtils.isBoolean(beRest)) {
|
|
12114
12114
|
if (!beRest) {
|
|
12115
|
-
const params = { status: false };
|
|
12115
|
+
const params = { status: false, msg: 'before prevent' };
|
|
12116
12116
|
return Promise.reject(params);
|
|
12117
12117
|
}
|
|
12118
12118
|
}
|
|
@@ -12229,7 +12229,7 @@ hooks$4.add('tableExportModule', {
|
|
|
12229
12229
|
const biRest = beforeImportMethod({ options: opts, $table: $xeTable });
|
|
12230
12230
|
if (XEUtils.isBoolean(biRest)) {
|
|
12231
12231
|
if (!biRest) {
|
|
12232
|
-
const params = { status: false };
|
|
12232
|
+
const params = { status: false, mas: 'before prevent' };
|
|
12233
12233
|
return Promise.reject(params);
|
|
12234
12234
|
}
|
|
12235
12235
|
}
|
|
@@ -12251,7 +12251,7 @@ hooks$4.add('tableExportModule', {
|
|
|
12251
12251
|
const biRest = beforeImportMethod({ options: opts, $table: $xeTable });
|
|
12252
12252
|
if (XEUtils.isBoolean(biRest)) {
|
|
12253
12253
|
if (!biRest) {
|
|
12254
|
-
const params = { status: false };
|
|
12254
|
+
const params = { status: false, mas: 'before prevent' };
|
|
12255
12255
|
return Promise.reject(params);
|
|
12256
12256
|
}
|
|
12257
12257
|
}
|
|
@@ -12401,7 +12401,8 @@ hooks$4.add('tableExportModule', {
|
|
|
12401
12401
|
}
|
|
12402
12402
|
}
|
|
12403
12403
|
else {
|
|
12404
|
-
|
|
12404
|
+
errLog$5('vxe.error.reqComp', ['vxe-print']);
|
|
12405
|
+
const e = { status: false, msg: 'print not exist' };
|
|
12405
12406
|
reject(e);
|
|
12406
12407
|
}
|
|
12407
12408
|
});
|
|
@@ -17627,9 +17628,10 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
17627
17628
|
if (!el || !el.clientWidth) {
|
|
17628
17629
|
return;
|
|
17629
17630
|
}
|
|
17631
|
+
const cellOpts = computeCellOpts.value;
|
|
17630
17632
|
const treeOpts = computeTreeOpts.value;
|
|
17631
17633
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
17632
|
-
if (!isAllOverflow && (scrollYLoad || scrollXLoad || (treeConfig && treeOpts.showLine))) {
|
|
17634
|
+
if (!isAllOverflow && (scrollYLoad || scrollXLoad || cellOpts.maxHeight || (treeConfig && treeOpts.showLine))) {
|
|
17633
17635
|
const { handleGetRowId } = createHandleGetRowId($xeTable);
|
|
17634
17636
|
el.setAttribute('data-calc-row', 'Y');
|
|
17635
17637
|
tableData.forEach(row => {
|
|
@@ -20273,7 +20275,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
20273
20275
|
const rowid = handleGetRowId(row);
|
|
20274
20276
|
const rowRest = fullAllDataRowIdData[rowid] || {};
|
|
20275
20277
|
rowRest.oTop = offsetTop;
|
|
20276
|
-
offsetTop += rowRest
|
|
20278
|
+
offsetTop += getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
20277
20279
|
// 是否展开行
|
|
20278
20280
|
if (expandColumn && rowExpandedMaps[rowid]) {
|
|
20279
20281
|
offsetTop += rowRest.expandHeight || expandOpts.height || 0;
|
|
@@ -20313,7 +20315,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
20313
20315
|
offsetTop = trEl.offsetTop + trEl.offsetHeight;
|
|
20314
20316
|
}
|
|
20315
20317
|
else {
|
|
20316
|
-
offsetTop = rowRest.oTop + (rowRest
|
|
20318
|
+
offsetTop = rowRest.oTop + getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
20317
20319
|
}
|
|
20318
20320
|
}
|
|
20319
20321
|
else {
|
|
@@ -21822,7 +21824,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
21822
21824
|
if (rowRest) {
|
|
21823
21825
|
const resizeHeight = rowRest.resizeHeight;
|
|
21824
21826
|
if (resizeHeight || isFull) {
|
|
21825
|
-
const currCellHeight =
|
|
21827
|
+
const currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
21826
21828
|
rest[rowid] = currCellHeight;
|
|
21827
21829
|
}
|
|
21828
21830
|
}
|
|
@@ -21888,7 +21890,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
21888
21890
|
const rowid = XEUtils.isString(rowOrId) || XEUtils.isNumber(rowOrId) ? rowOrId : getRowid($xeTable, rowOrId);
|
|
21889
21891
|
const rowRest = fullAllDataRowIdData[rowid];
|
|
21890
21892
|
if (rowRest) {
|
|
21891
|
-
return rowRest
|
|
21893
|
+
return getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
21892
21894
|
}
|
|
21893
21895
|
return 0;
|
|
21894
21896
|
},
|
|
@@ -25549,7 +25551,7 @@ var VxeTableComponent = defineVxeComponent({
|
|
|
25549
25551
|
return;
|
|
25550
25552
|
}
|
|
25551
25553
|
const defaultRowHeight = computeDefaultRowHeight.value;
|
|
25552
|
-
let currCellHeight = rowRest
|
|
25554
|
+
let currCellHeight = getCellRestHeight(rowRest, cellOpts, rowOpts, defaultRowHeight);
|
|
25553
25555
|
if (!showOverflow) {
|
|
25554
25556
|
currCellHeight = tdEl.clientHeight;
|
|
25555
25557
|
}
|