Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/16669

Vanessa01223c811099
diff --git a/app/src/util/pathName.ts b/app/src/util/pathName.ts
index c48e1bdbb7..28fcd24c9e 100644
--- a/app/src/util/pathName.ts
+++ b/app/src/util/pathName.ts
@@ -608,7 +608,10 @@ const getLeaf = (liElement: HTMLElement, flashcard: boolean) => {
liElement.nextElementSibling.classList.remove("fn__none");
return;
}
-
+ if (liElement.getAttribute("data-loading") === "true") {
+ return;
+ }
+ liElement.setAttribute("data-loading", "true");
const notebookId = liElement.getAttribute("data-box");
fetchPost("/api/filetree/listDocsByPath", {
notebook: notebookId,
@@ -616,6 +619,7 @@ const getLeaf = (liElement: HTMLElement, flashcard: boolean) => {
flashcard,
app: Constants.SIYUAN_APPID,
}, response => {
+ liElement.removeAttribute("data-loading");
if (response.data.files.length === 0) {
showMessage(window.siyuan.languages.emptyContent);
return;