mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 17:56:09 +01:00
This commit is contained in:
parent
e09fcc4b01
commit
79d88a0526
1 changed files with 22 additions and 8 deletions
|
|
@ -65,14 +65,28 @@ export const getDocByScroll = (options: {
|
|||
id: options.scrollAttr.zoomInId,
|
||||
size: Constants.SIZE_GET_MAX,
|
||||
}, response => {
|
||||
actions.push(Constants.CB_GET_ALL);
|
||||
onGet({
|
||||
data: response,
|
||||
protyle: options.protyle,
|
||||
action: actions,
|
||||
scrollAttr: options.scrollAttr,
|
||||
afterCB: options.cb
|
||||
});
|
||||
if (response.code === 1) {
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: options.scrollAttr.rootId || options.mergedOptions?.blockId || options.protyle.block?.rootID || options.scrollAttr.startId,
|
||||
}, response => {
|
||||
onGet({
|
||||
data: response,
|
||||
protyle: options.protyle,
|
||||
action: actions,
|
||||
scrollAttr: options.scrollAttr,
|
||||
afterCB: options.cb
|
||||
});
|
||||
});
|
||||
} else {
|
||||
actions.push(Constants.CB_GET_ALL);
|
||||
onGet({
|
||||
data: response,
|
||||
protyle: options.protyle,
|
||||
action: actions,
|
||||
scrollAttr: options.scrollAttr,
|
||||
afterCB: options.cb
|
||||
});
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue