Vanessa 2023-05-24 10:51:32 +08:00
parent 808247e11d
commit 2efa085bde
4 changed files with 94 additions and 69 deletions

View file

@ -72,7 +72,7 @@ export class Plugin {
iconElement.setAttribute("data-menu", "true");
iconElement.innerHTML = options.icon.startsWith("icon") ? `<svg><use xlink:href="#${options.icon}"></use></svg>` : options.icon;
iconElement.addEventListener("click", options.callback);
iconElement.setAttribute("data-position", options.position );
iconElement.setAttribute("data-position", options.position);
}
this.topBarIcons.push(iconElement);
return iconElement;