This commit is contained in:
Vanessa 2023-05-17 12:37:56 +08:00
parent 05248d66be
commit fb0c2e3d6a
7 changed files with 26 additions and 24 deletions

View file

@ -45,6 +45,8 @@ export const openNewWindowById = (id: string) => {
fetchPost("/api/attr/getBlockAttrs", {id}, (attrResponse) => {
if (attrResponse.data.scroll) {
json.children.scrollAttr = JSON.parse(attrResponse.data.scroll);
// 历史数据兼容
json.children.scrollAttr.rootId = response.data.rootID;
}
/// #if !BROWSER
ipcRenderer.send(Constants.SIYUAN_OPENWINDOW, {
@ -56,12 +58,7 @@ export const openNewWindowById = (id: string) => {
} else {
json.children.action = Constants.CB_GET_ALL;
json.children.scrollAttr = {
startId: id,
endId: id,
scrollTop: 0,
focusId: id,
focusStart: 0,
focusEnd: 0
zoomInId: id,
};
/// #if !BROWSER
ipcRenderer.send(Constants.SIYUAN_OPENWINDOW, {