feat: 调整调整功能和导出名称

This commit is contained in:
2025-12-11 20:44:33 +08:00
parent 10204a0baf
commit 19391cb466
3 changed files with 5 additions and 4 deletions

View File

@ -71,7 +71,7 @@ export const downloadPDF = async (dom, name = '导出文件') => {
// 带样式的下载方法
export function downloadDocWithStyle(textContent) {
export function downloadDocWithStyle(textContent, title = '战术研判报告') {
if (typeof textContent !== 'string') return;
const wordDocument = `
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >
@ -104,5 +104,6 @@ export function downloadDocWithStyle(textContent) {
type: 'application/msword'
});
saveAs(blob, '研判报告.doc');
saveAs(blob, `${title}.doc`);
};