mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
This commit is contained in:
parent
1272b16eb7
commit
84a28b35bb
1 changed files with 6 additions and 4 deletions
|
|
@ -571,10 +571,12 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
document.querySelector(".av__mask")?.remove();
|
||||
}
|
||||
if (item.getAttribute("data-av-type") === "gallery") {
|
||||
const filesElement = item.querySelector(`.av__gallery-item[data-id="${operation.srcs[0].id}"]`)?.querySelector(".av__gallery-fields");
|
||||
if (filesElement && filesElement.querySelector('[data-dtype="block"]')?.getAttribute("data-empty") === "true") {
|
||||
filesElement.classList.add("av__gallery-fields--edit");
|
||||
}
|
||||
operation.srcs.forEach(srcItem => {
|
||||
const filesElement = item.querySelector(`.av__gallery-item[data-id="${srcItem.id}"]`)?.querySelector(".av__gallery-fields");
|
||||
if (filesElement && filesElement.querySelector('[data-dtype="block"]')?.getAttribute("data-empty") === "true") {
|
||||
filesElement.classList.add("av__gallery-fields--edit");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue