releases 4.7.27
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vxe-table",
|
||||
"version": "4.7.26",
|
||||
"version": "4.7.27",
|
||||
"description": "一个基于 vue 的 PC 端表格组件,支持增删改查、虚拟树、列拖拽,懒加载、快捷菜单、数据校验、树形结构、打印、导入导出、自定义模板、渲染器、JSON 配置式...",
|
||||
"scripts": {
|
||||
"update": "npm install --legacy-peer-deps",
|
||||
|
||||
@@ -1242,22 +1242,29 @@ hooks.add('tableExportModule', {
|
||||
opts.sheetName = document.title
|
||||
}
|
||||
const beforePrintMethod = opts.beforePrintMethod
|
||||
const tableHtml = opts.html || opts.content
|
||||
return new Promise((resolve, reject) => {
|
||||
if (VxeUI.print) {
|
||||
if (opts.content) {
|
||||
if (tableHtml) {
|
||||
resolve(
|
||||
VxeUI.print({
|
||||
title: opts.sheetName,
|
||||
html: opts.content
|
||||
html: tableHtml,
|
||||
customStyle: opts.style,
|
||||
beforeMethod: beforePrintMethod
|
||||
? ({ html }) => {
|
||||
return beforePrintMethod({ html, content: html, options: opts, $table: $xeTable })
|
||||
}
|
||||
: undefined
|
||||
})
|
||||
)
|
||||
} else {
|
||||
resolve(
|
||||
exportMethods.exportData(opts).then(({ content }: any) => {
|
||||
debugger
|
||||
return VxeUI.print({
|
||||
title: opts.sheetName,
|
||||
html: content,
|
||||
customStyle: opts.style,
|
||||
beforeMethod: beforePrintMethod
|
||||
? ({ html }) => {
|
||||
return beforePrintMethod({ html, content: html, options: opts, $table: $xeTable })
|
||||
|
||||
Reference in New Issue
Block a user