mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
🎨 重建索引时清空 scroll
This commit is contained in:
parent
32413fa11c
commit
f3b0ee51d5
3 changed files with 15 additions and 3 deletions
|
|
@ -19,6 +19,7 @@ import {openFileById} from "../../editor/util";
|
|||
import {hasClosestByAttribute, hasClosestByTag, hasTopClosestByTag} from "../../protyle/util/hasClosest";
|
||||
import {isTouchDevice} from "../../util/functions";
|
||||
import {App} from "../../index";
|
||||
import {refreshFileTree} from "../../dialog/processSystem";
|
||||
|
||||
export class Files extends Model {
|
||||
public element: HTMLElement;
|
||||
|
|
@ -1074,7 +1075,7 @@ aria-label="${escapeHtml(ariaLabel)}">${getDisplayName(item.name, true, true)}</
|
|||
click: () => {
|
||||
if (!this.element.getAttribute("disabled")) {
|
||||
this.element.setAttribute("disabled", "disabled");
|
||||
fetchPost("/api/filetree/refreshFiletree", {}, () => {
|
||||
refreshFileTree(() => {
|
||||
this.element.removeAttribute("disabled");
|
||||
this.init(false);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue