mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
This commit is contained in:
parent
bcef9bdff9
commit
ac050a5e03
2 changed files with 5 additions and 0 deletions
|
|
@ -229,6 +229,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
|||
event.stopPropagation();
|
||||
return true;
|
||||
} else if (type === "av-group-fold") {
|
||||
target.setAttribute("data-processed", "true");
|
||||
const isOpen = target.firstElementChild.classList.contains("av__group-arrow--open");
|
||||
if (isOpen) {
|
||||
target.firstElementChild.classList.remove("av__group-arrow--open");
|
||||
|
|
|
|||
|
|
@ -784,6 +784,10 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
getAVElements(protyle, operation.avID).forEach((item) => {
|
||||
const foldElement = item.querySelector(`[data-type="av-group-fold"][data-id="${operation.id}"]`);
|
||||
if (foldElement) {
|
||||
if (foldElement.getAttribute("data-processed") === "true") {
|
||||
foldElement.removeAttribute("data-processed");
|
||||
return;
|
||||
}
|
||||
if (operation.data) {
|
||||
foldElement.firstElementChild.classList.remove("av__group-arrow--open");
|
||||
foldElement.parentElement.nextElementSibling.classList.add("fn__none");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue