mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
🎨 重建索引时清空 scroll
This commit is contained in:
parent
32413fa11c
commit
f3b0ee51d5
3 changed files with 15 additions and 3 deletions
|
|
@ -278,11 +278,21 @@ export const transactionError = () => {
|
|||
/// #endif
|
||||
});
|
||||
btnsElement[1].addEventListener("click", () => {
|
||||
fetchPost("/api/filetree/refreshFiletree", {});
|
||||
refreshFileTree();
|
||||
dialog.destroy();
|
||||
});
|
||||
};
|
||||
|
||||
export const refreshFileTree = (cb?:() => void) => {
|
||||
window.siyuan.storage[Constants.LOCAL_FILEPOSITION] = {};
|
||||
setStorageVal(Constants.LOCAL_FILEPOSITION, window.siyuan.storage[Constants.LOCAL_FILEPOSITION]);
|
||||
fetchPost("/api/filetree/refreshFiletree", {}, () => {
|
||||
if (cb) {
|
||||
cb()
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let statusTimeout: number;
|
||||
export const progressStatus = (data: IWebSocketData) => {
|
||||
const statusElement = document.querySelector("#status") as HTMLElement;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue