Vanessa 2025-11-24 11:06:58 +08:00
parent bcef9bdff9
commit ac050a5e03
2 changed files with 5 additions and 0 deletions

View file

@ -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");

View file

@ -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");