diff --git a/app/src/menus/commonMenuItem.ts b/app/src/menus/commonMenuItem.ts index f55ee7206..2766f1212 100644 --- a/app/src/menus/commonMenuItem.ts +++ b/app/src/menus/commonMenuItem.ts @@ -431,7 +431,7 @@ export const copySubMenu = (id: string, accelerator = true, focusElement?: Eleme }]; }; -export const exportMd = (id: string, fileType = "NodeDocument") => { +export const exportMd = (id: string) => { return new MenuItem({ label: window.siyuan.languages.export, type: "submenu", @@ -532,7 +532,7 @@ export const exportMd = (id: string, fileType = "NodeDocument") => { label: window.siyuan.languages.image, icon: "iconImage", click: () => { - exportImage(id, fileType); + exportImage(id); } }, /// #if !BROWSER @@ -540,26 +540,26 @@ export const exportMd = (id: string, fileType = "NodeDocument") => { label: "PDF", icon: "iconPDF", click: () => { - saveExport({type: "pdf", id, fileType}); + saveExport({type: "pdf", id}); } }, { label: "HTML (SiYuan)", iconClass: "ft__error", icon: "iconHTML5", click: () => { - saveExport({type: "html", id, fileType}); + saveExport({type: "html", id}); } }, { label: "HTML (Markdown)", icon: "iconHTML5", click: () => { - saveExport({type: "htmlmd", id, fileType}); + saveExport({type: "htmlmd", id}); } }, { label: "Word .docx", icon: "iconExact", click: () => { - saveExport({type: "word", id, fileType}); + saveExport({type: "word", id}); } }, { label: window.siyuan.languages.more, diff --git a/app/src/protyle/export/index.ts b/app/src/protyle/export/index.ts index fa0f1c9ee..38ed69079 100644 --- a/app/src/protyle/export/index.ts +++ b/app/src/protyle/export/index.ts @@ -19,10 +19,10 @@ export const saveExport = (option: IExportOptions) => { if (option.type === "pdf") { if (window.siyuan.config.appearance.mode === 1) { confirmDialog(window.siyuan.languages.pdfTip, window.siyuan.languages.pdfConfirm, () => { - renderPDF(option.id, option.fileType); + renderPDF(option.id); }); } else { - renderPDF(option.id, option.fileType); + renderPDF(option.id); } } else if (option.type === "word") { const localData = window.siyuan.storage[Constants.LOCAL_EXPORTWORD]; @@ -69,7 +69,7 @@ export const saveExport = (option: IExportOptions) => { }; /// #if !BROWSER -const renderPDF = (id: string, fileType: string) => { +const renderPDF = (id: string) => { const localData = window.siyuan.storage[Constants.LOCAL_EXPORTPDF]; const servePath = window.location.protocol + "//" + window.location.host; const isDefault = (window.siyuan.config.appearance.mode === 1 && window.siyuan.config.appearance.themeDark === "midnight") || (window.siyuan.config.appearance.mode === 0 && window.siyuan.config.appearance.themeLight === "daylight"); @@ -244,7 +244,6 @@ const renderPDF = (id: string, fileType: string) => {