mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
ea589fef7b
commit
7e114a6671
6 changed files with 21 additions and 16 deletions
|
|
@ -68,6 +68,7 @@ export class Plugin {
|
|||
const iconElement = document.createElement("div");
|
||||
if (isMobile()) {
|
||||
iconElement.className = "b3-menu__item";
|
||||
iconElement.setAttribute("data-menu", "true");
|
||||
iconElement.innerHTML = (options.icon.startsWith("icon") ? `<svg class="b3-menu__icon"><use xlink:href="#${options.icon}"></use></svg>` : options.icon) +
|
||||
`<span class="b3-menu__label">${options.title}</span>`;
|
||||
iconElement.addEventListener("click", options.callback);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue