mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
410251677c
commit
4837f35487
5 changed files with 23 additions and 18 deletions
|
|
@ -226,22 +226,14 @@ data-def-path="${item.defPath}">
|
|||
});
|
||||
}
|
||||
|
||||
public collapseAll(isFirst = false) {
|
||||
public collapseAll() {
|
||||
this.element.querySelectorAll("ul").forEach(item => {
|
||||
if (!item.classList.contains("b3-list")) {
|
||||
if (isFirst && item.parentElement.classList.contains("b3-list")) {
|
||||
// 第一层级不进行缩放
|
||||
} else {
|
||||
item.classList.add("fn__none");
|
||||
}
|
||||
item.classList.add("fn__none");
|
||||
}
|
||||
});
|
||||
this.element.querySelectorAll(".b3-list-item__arrow").forEach(item => {
|
||||
if (isFirst && item.parentElement.parentElement.parentElement.classList.contains("b3-list")) {
|
||||
// 第一层级不进行缩放
|
||||
} else {
|
||||
item.classList.remove("b3-list-item__arrow--open");
|
||||
}
|
||||
item.classList.remove("b3-list-item__arrow--open");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue