Improve Menu
for plugin (#9219)
* 🎨 Improve `Menu` for plugin
* Update Menu.ts
This commit is contained in:
parent
b902789aa4
commit
74dad4fc55
1 changed files with 3 additions and 0 deletions
|
@ -3,10 +3,13 @@ import {Menu as SiyuanMenu} from "../menus/Menu";
|
|||
export class Menu {
|
||||
private menu: SiyuanMenu;
|
||||
public isOpen: boolean;
|
||||
public element: HTMLElement;
|
||||
|
||||
constructor(id?: string, closeCB?: () => void) {
|
||||
this.menu = window.siyuan.menus.menu;
|
||||
this.isOpen = false;
|
||||
this.element = this.menu.element;
|
||||
|
||||
if (id) {
|
||||
const dataName = this.menu.element.getAttribute("data-name");
|
||||
if (dataName && dataName === id) {
|
||||
|
|
Loading…
Add table
Reference in a new issue