mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
8143c58cf5
commit
010a3eb002
4 changed files with 17 additions and 1 deletions
|
|
@ -127,7 +127,12 @@ export class MenuItem {
|
|||
window.siyuan.menus.menu.remove();
|
||||
});
|
||||
}
|
||||
let 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><span class="b3-menu__label">${options.label}</span>`;
|
||||
let html = `<span class="b3-menu__label">${options.label}</span>`;
|
||||
if (options.iconHTML) {
|
||||
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}`;
|
||||
}
|
||||
if (options.accelerator) {
|
||||
html += `<span class="b3-menu__accelerator">${updateHotkeyTip(options.accelerator)}</span>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue