Vanessa 2025-07-08 15:40:12 +08:00
parent 1272b16eb7
commit 84a28b35bb

View file

@ -571,10 +571,12 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
document.querySelector(".av__mask")?.remove(); document.querySelector(".av__mask")?.remove();
} }
if (item.getAttribute("data-av-type") === "gallery") { if (item.getAttribute("data-av-type") === "gallery") {
const filesElement = item.querySelector(`.av__gallery-item[data-id="${operation.srcs[0].id}"]`)?.querySelector(".av__gallery-fields"); operation.srcs.forEach(srcItem => {
if (filesElement && filesElement.querySelector('[data-dtype="block"]')?.getAttribute("data-empty") === "true") { const filesElement = item.querySelector(`.av__gallery-item[data-id="${srcItem.id}"]`)?.querySelector(".av__gallery-fields");
filesElement.classList.add("av__gallery-fields--edit"); if (filesElement && filesElement.querySelector('[data-dtype="block"]')?.getAttribute("data-empty") === "true") {
} filesElement.classList.add("av__gallery-fields--edit");
}
});
} }
} }
} }