mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
This commit is contained in:
parent
344a7ca950
commit
220e0b137f
7 changed files with 23 additions and 9 deletions
|
|
@ -49,18 +49,18 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void, v
|
|||
}
|
||||
const created = protyle.options.history?.created;
|
||||
const snapshot = protyle.options.history?.snapshot;
|
||||
let newViewID = e.getAttribute("custom-sy-av-view") || "";
|
||||
let newViewID = e.getAttribute(Constants.CUSTOM_SY_AV_VIEW) || "";
|
||||
if (typeof viewID === "string") {
|
||||
newViewID = viewID;
|
||||
fetchPost("/api/av/setDatabaseBlockView", {id: e.dataset.nodeId, viewID});
|
||||
e.setAttribute("custom-sy-av-view", newViewID);
|
||||
e.setAttribute(Constants.CUSTOM_SY_AV_VIEW, newViewID);
|
||||
}
|
||||
fetchPost(created ? "/api/av/renderHistoryAttributeView" : (snapshot ? "/api/av/renderSnapshotAttributeView" : "/api/av/renderAttributeView"), {
|
||||
id: e.getAttribute("data-av-id"),
|
||||
created,
|
||||
snapshot,
|
||||
pageSize: parseInt(e.dataset.pageSize) || undefined,
|
||||
viewID: newViewID || e.getAttribute("custom-sy-av-view")
|
||||
viewID: newViewID
|
||||
}, (response) => {
|
||||
const data = response.data.view as IAVTable;
|
||||
if (!e.dataset.pageSize) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue