This commit is contained in:
Vanessa 2023-06-18 00:36:51 +08:00
parent 05cd94bc12
commit 9eaf181379
4 changed files with 48 additions and 13 deletions

View file

@ -547,12 +547,17 @@ export const updateOutline = (models: IModels, protyle: IProtyle, reload = false
if (blockId === item.blockId && !reload) {
return;
}
if (protyle && !protyle.preview.element.classList.contains("fn__none")) {
protyle.preview.render(protyle);
return;
}
fetchPost("/api/outline/getDocOutline", {
id: blockId,
}, response => {
if (!isCurrentEditor(blockId) || item.blockId === blockId) {
if (!reload && (!isCurrentEditor(blockId) || item.blockId === blockId)) {
return;
}
item.isPreview = false;
item.update(response, blockId);
if (protyle) {
item.updateDocTitle(protyle.background.ial);
@ -569,7 +574,6 @@ export const updateOutline = (models: IModels, protyle: IProtyle, reload = false
item.updateDocTitle();
}
});
return;
}
});
};