This commit is contained in:
parent
3ce6e4824b
commit
445108525f
3 changed files with 4 additions and 4 deletions
|
@ -694,6 +694,7 @@ export const openMenuPanel = (options: {
|
|||
avID,
|
||||
id
|
||||
}]);
|
||||
options.blockElement.setAttribute("custom-sy-av-view", id)
|
||||
avPanelElement.remove();
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
@ -54,8 +54,6 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
newViewID = viewID;
|
||||
fetchPost("/api/av/setDatabaseBlockView", {id: e.dataset.nodeId, viewID});
|
||||
e.setAttribute("custom-sy-av-view", newViewID);
|
||||
} else if (typeof viewID === "undefined") {
|
||||
newViewID = e.querySelector(".av__header .item--focus")?.getAttribute("data-id");
|
||||
}
|
||||
fetchPost(created ? "/api/av/renderHistoryAttributeView" : (snapshot ? "/api/av/renderSnapshotAttributeView" : "/api/av/renderAttributeView"), {
|
||||
id: e.getAttribute("data-av-id"),
|
||||
|
@ -309,8 +307,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
// 更新属性面板
|
||||
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);
|
||||
}
|
||||
}, ["addAttrViewView", "duplicateAttrViewView"].includes(operation.action) ? operation.id :
|
||||
(operation.action === "removeAttrViewView" ? null : undefined));
|
||||
});
|
||||
});
|
||||
}
|
||||
}, ["insertAttrViewBlock"].includes(operation.action) ? 2 : 100);
|
||||
|
|
|
@ -54,6 +54,7 @@ export const openViewMenu = (options: { protyle: IProtyle, blockElement: HTMLEle
|
|||
avID: options.blockElement.dataset.avId,
|
||||
id
|
||||
}]);
|
||||
options.blockElement.setAttribute("custom-sy-av-view", id)
|
||||
}
|
||||
});
|
||||
menu.addItem({
|
||||
|
@ -204,4 +205,5 @@ export const addView = (protyle: IProtyle, blockElement: Element) => {
|
|||
avID,
|
||||
id
|
||||
}]);
|
||||
blockElement.setAttribute("custom-sy-av-view", id);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue