mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-06 12:50:16 +01:00
This commit is contained in:
parent
fb72af192e
commit
54ca2d6226
12 changed files with 112 additions and 65 deletions
|
|
@ -162,6 +162,15 @@ export class MenuItem {
|
|||
public element: HTMLElement;
|
||||
|
||||
constructor(options: IMenu) {
|
||||
if (options.type === "empty") {
|
||||
this.element = document.createElement("div");
|
||||
this.element.innerHTML = options.label;
|
||||
if (options.bind) {
|
||||
options.bind(this.element);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.element = document.createElement("button");
|
||||
if (options.disabled) {
|
||||
this.element.setAttribute("disabled", "disabled");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue