vxe-table 4.7.27-beta.0 → 4.7.27-beta.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.
|
@@ -1197,12 +1197,19 @@ hooks.add('tableExportModule', {
|
|
|
1197
1197
|
opts.sheetName = document.title;
|
|
1198
1198
|
}
|
|
1199
1199
|
const beforePrintMethod = opts.beforePrintMethod;
|
|
1200
|
+
const tableHtml = opts.html || opts.content;
|
|
1200
1201
|
return new Promise((resolve, reject) => {
|
|
1201
1202
|
if (VxeUI.print) {
|
|
1202
|
-
if (
|
|
1203
|
+
if (tableHtml) {
|
|
1203
1204
|
resolve(VxeUI.print({
|
|
1204
1205
|
title: opts.sheetName,
|
|
1205
|
-
html:
|
|
1206
|
+
html: tableHtml,
|
|
1207
|
+
customStyle: opts.style,
|
|
1208
|
+
beforeMethod: beforePrintMethod
|
|
1209
|
+
? ({ html }) => {
|
|
1210
|
+
return beforePrintMethod({ html, content: html, options: opts, $table: $xeTable });
|
|
1211
|
+
}
|
|
1212
|
+
: undefined
|
|
1206
1213
|
}));
|
|
1207
1214
|
}
|
|
1208
1215
|
else {
|
|
@@ -1210,6 +1217,7 @@ hooks.add('tableExportModule', {
|
|
|
1210
1217
|
return VxeUI.print({
|
|
1211
1218
|
title: opts.sheetName,
|
|
1212
1219
|
html: content,
|
|
1220
|
+
customStyle: opts.style,
|
|
1213
1221
|
beforeMethod: beforePrintMethod
|
|
1214
1222
|
? ({ html }) => {
|
|
1215
1223
|
return beforePrintMethod({ html, content: html, options: opts, $table: $xeTable });
|
package/lib/index.umd.js
CHANGED
|
@@ -19404,12 +19404,24 @@ export_hook_hooks.add('tableExportModule', {
|
|
|
19404
19404
|
opts.sheetName = document.title;
|
|
19405
19405
|
}
|
|
19406
19406
|
const beforePrintMethod = opts.beforePrintMethod;
|
|
19407
|
+
const tableHtml = opts.html || opts.content;
|
|
19407
19408
|
return new Promise((resolve, reject) => {
|
|
19408
19409
|
if (core_.VxeUI.print) {
|
|
19409
|
-
if (
|
|
19410
|
+
if (tableHtml) {
|
|
19410
19411
|
resolve(core_.VxeUI.print({
|
|
19411
19412
|
title: opts.sheetName,
|
|
19412
|
-
html:
|
|
19413
|
+
html: tableHtml,
|
|
19414
|
+
customStyle: opts.style,
|
|
19415
|
+
beforeMethod: beforePrintMethod ? ({
|
|
19416
|
+
html
|
|
19417
|
+
}) => {
|
|
19418
|
+
return beforePrintMethod({
|
|
19419
|
+
html,
|
|
19420
|
+
content: html,
|
|
19421
|
+
options: opts,
|
|
19422
|
+
$table: $xeTable
|
|
19423
|
+
});
|
|
19424
|
+
} : undefined
|
|
19413
19425
|
}));
|
|
19414
19426
|
} else {
|
|
19415
19427
|
resolve(exportMethods.exportData(opts).then(({
|
|
@@ -19418,6 +19430,7 @@ export_hook_hooks.add('tableExportModule', {
|
|
|
19418
19430
|
return core_.VxeUI.print({
|
|
19419
19431
|
title: opts.sheetName,
|
|
19420
19432
|
html: content,
|
|
19433
|
+
customStyle: opts.style,
|
|
19421
19434
|
beforeMethod: beforePrintMethod ? ({
|
|
19422
19435
|
html
|
|
19423
19436
|
}) => {
|