1
0
mirror of synced 2025-12-09 07:08:22 +08:00

fix table beforePrintMethod 无效问题

This commit is contained in:
xuliangzhan
2024-06-20 12:09:56 +08:00
parent 85dd0cfb20
commit 4b2b5fd88e

View File

@@ -1241,6 +1241,7 @@ hooks.add('tableExportModule', {
if (!opts.sheetName) {
opts.sheetName = document.title
}
const beforePrintMethod = opts.beforePrintMethod
return new Promise((resolve, reject) => {
if (VxeUI.print) {
if (opts.content) {
@@ -1253,9 +1254,15 @@ hooks.add('tableExportModule', {
} else {
resolve(
exportMethods.exportData(opts).then(({ content }: any) => {
debugger
return VxeUI.print({
title: opts.sheetName,
html: content
html: content,
beforeMethod: beforePrintMethod
? ({ html }) => {
return beforePrintMethod({ html, content: html, options: opts, $table: $xeTable })
}
: undefined
})
})
)