mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-18 01:50:58 +08:00
This commit is contained in:
parent
5c7f3ab0bd
commit
3741775dca
@ -32,10 +32,11 @@ const setBacklinkFold = (html: string, expand: boolean) => {
|
|||||||
tempDom.innerHTML = html;
|
tempDom.innerHTML = html;
|
||||||
if (tempDom.content.firstElementChild.classList.contains("li")) {
|
if (tempDom.content.firstElementChild.classList.contains("li")) {
|
||||||
if (expand) {
|
if (expand) {
|
||||||
const thirdLiElement = tempDom.content.querySelector(".li .li .li");
|
tempDom.content.querySelectorAll(".li .li .li").forEach(item => {
|
||||||
if (thirdLiElement) {
|
if (item.childElementCount > 3) {
|
||||||
thirdLiElement.setAttribute("fold", "1");
|
item.setAttribute("fold", "1");
|
||||||
}
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
tempDom.content.firstElementChild.setAttribute("fold", "1");
|
tempDom.content.firstElementChild.setAttribute("fold", "1");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user