mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
🎨 https://github.com/siyuan-note/siyuan/issues/5066 click menu icon
This commit is contained in:
parent
fe3c6012c8
commit
839308173a
3 changed files with 24 additions and 7 deletions
|
|
@ -39,16 +39,14 @@ export class Menu {
|
|||
if (this.isOpen) {
|
||||
return;
|
||||
}
|
||||
const menuItem = new MenuItem(option);
|
||||
this.menu.append(menuItem.element);
|
||||
return menuItem.element;
|
||||
return this.menu.addItem(option);
|
||||
}
|
||||
|
||||
addSeparator() {
|
||||
if (this.isOpen) {
|
||||
return;
|
||||
}
|
||||
this.addItem({type: "separator"});
|
||||
this.menu.addSeparator();
|
||||
}
|
||||
|
||||
open(options: { x: number, y: number, h?: number, w?: number, isLeft: false }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue