Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/15468

Vanessa6f132842a7b1
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index e0b66ca202..3bd96c2bbd 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -587,15 +587,14 @@ 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;
}