Vanessa 2025-08-08 15:22:05 +08:00
parent b40f8c898a
commit 6f132842a7

View file

@ -587,16 +587,15 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
}
if (operation.action === "setAttrViewCardSize") {
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
const galleryElement = item.querySelector(".av__gallery") as HTMLElement;
if (galleryElement) {
galleryElement.classList.remove("av__gallery--small", "av__gallery--big");
item.querySelectorAll(".av__gallery").forEach(galleryItem => {
galleryItem.classList.remove("av__gallery--small", "av__gallery--big");
if (operation.data === 0) {
galleryElement.classList.add("av__gallery--small");
galleryItem.classList.add("av__gallery--small");
} else if (operation.data === 2) {
galleryElement.classList.add("av__gallery--big");
}
galleryItem.classList.add("av__gallery--big");
}
});
});
return;
}
if (operation.action === "setAttrViewCardAspectRatio") {