mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
0cf13cca8f
commit
2bcf4dcf71
3 changed files with 22 additions and 5 deletions
|
|
@ -30,7 +30,8 @@ export const openMenuPanel = (options: {
|
|||
blockElement: Element,
|
||||
type: "select" | "properties" | "config" | "sorts" | "filters" | "edit" | "date" | "asset",
|
||||
colId?: string, // for edit
|
||||
cellElements?: HTMLElement[] // for select & date
|
||||
cellElements?: HTMLElement[], // for select & date
|
||||
cb?: (avPanelElement: Element) => void
|
||||
}) => {
|
||||
let avPanelElement = document.querySelector(".av__panel");
|
||||
if (avPanelElement) {
|
||||
|
|
@ -97,6 +98,9 @@ export const openMenuPanel = (options: {
|
|||
bindViewEvent({protyle: options.protyle, data, menuElement});
|
||||
}
|
||||
}
|
||||
if (options.cb) {
|
||||
options.cb(avPanelElement);
|
||||
}
|
||||
avPanelElement.addEventListener("dragstart", (event: DragEvent) => {
|
||||
window.siyuan.dragElement = event.target as HTMLElement;
|
||||
window.siyuan.dragElement.style.opacity = ".1";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue