Vanessa 2023-10-01 17:05:06 +08:00
parent 6e475e1857
commit b981fa08a0
14 changed files with 53 additions and 22 deletions

View file

@ -206,7 +206,7 @@ export class MenuItem {
if (typeof options.iconHTML === "string") {
html = options.iconHTML + html;
} else {
html = `<svg class="b3-menu__icon${["HTML (SiYuan)", window.siyuan.languages.template].includes(options.label) ? " ft__error" : ""}" style="${options.icon === "iconClose" ? "height:10px;" : ""}"><use xlink:href="#${options.icon || ""}"></use></svg>${html}`;
html = `<svg class="b3-menu__icon ${options.iconClass || ""}" style="${options.icon === "iconClose" ? "height:10px;" : ""}"><use xlink:href="#${options.icon || ""}"></use></svg>${html}`;
}
if (options.accelerator) {
html += `<span class="b3-menu__accelerator">${updateHotkeyTip(options.accelerator)}</span>`;

View file

@ -431,6 +431,7 @@ export const exportMd = (id: string) => {
icon: "iconUpload",
submenu: [{
label: window.siyuan.languages.template,
iconClass: "ft__error",
icon: "iconMarkdown",
click: async () => {
const result = await fetchSyncPost("/api/block/getRefText", {id: id});
@ -536,6 +537,7 @@ export const exportMd = (id: string) => {
}
}, {
label: "HTML (SiYuan)",
iconClass: "ft__error",
icon: "iconHTML5",
click: () => {
saveExport({type: "html", id});