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 add index for menu
This commit is contained in:
parent
981c6688b8
commit
19dd0cd796
4 changed files with 15 additions and 8 deletions
|
|
@ -2,7 +2,6 @@ import {confirmDialog} from "../dialog/confirmDialog";
|
|||
import {Plugin} from "./index";
|
||||
import {showMessage} from "../dialog/message";
|
||||
import {Dialog} from "../dialog";
|
||||
import {MenuItem} from "../menus/Menu";
|
||||
import {Menu as SiyuanMenu} from "../menus/Menu";
|
||||
import {fetchGet, fetchPost, fetchSyncPost} from "../util/fetch";
|
||||
import {isMobile} from "../util/functions";
|
||||
|
|
@ -42,11 +41,11 @@ export class Menu {
|
|||
return this.menu.addItem(option);
|
||||
}
|
||||
|
||||
addSeparator() {
|
||||
addSeparator(index?: number) {
|
||||
if (this.isOpen) {
|
||||
return;
|
||||
}
|
||||
this.menu.addSeparator();
|
||||
this.menu.addSeparator(index);
|
||||
}
|
||||
|
||||
open(options: { x: number, y: number, h?: number, w?: number, isLeft: false }) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue