mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-10 22:52:34 +01:00
🚨
This commit is contained in:
parent
85d2faa158
commit
5f09312ae1
3 changed files with 18 additions and 18 deletions
|
|
@ -104,8 +104,8 @@ export class Gutter {
|
|||
}
|
||||
}
|
||||
});
|
||||
const doOperations: IOperation[] = []
|
||||
const undoOperations: IOperation[] = []
|
||||
const doOperations: IOperation[] = [];
|
||||
const undoOperations: IOperation[] = [];
|
||||
Array.from(foldElement.children).forEach((ulElement) => {
|
||||
if (ulElement.classList.contains("list")) {
|
||||
Array.from(ulElement.children).forEach((listItemElement) => {
|
||||
|
|
@ -120,12 +120,12 @@ export class Gutter {
|
|||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "0" : "1"})
|
||||
})
|
||||
});
|
||||
undoOperations.push({
|
||||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "1" : "0"})
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -169,8 +169,8 @@ export class Gutter {
|
|||
}
|
||||
}
|
||||
});
|
||||
const doOperations: IOperation[] = []
|
||||
const undoOperations: IOperation[] = []
|
||||
const doOperations: IOperation[] = [];
|
||||
const undoOperations: IOperation[] = [];
|
||||
Array.from(foldElement.parentElement.children).find((listItemElement) => {
|
||||
if (listItemElement.classList.contains("li")) {
|
||||
if (hasFold) {
|
||||
|
|
@ -183,12 +183,12 @@ export class Gutter {
|
|||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "0" : "1"})
|
||||
})
|
||||
});
|
||||
undoOperations.push({
|
||||
action: "setAttrs",
|
||||
id: listId,
|
||||
data: JSON.stringify({fold: hasFold ? "1" : "0"})
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
transaction(protyle, doOperations, undoOperations);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue