mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
🐛 Improve setAttrViewCardSize (#15156)
fix https://github.com/siyuan-note/siyuan/issues/15092#issuecomment-3008758463
This commit is contained in:
parent
bf0018e0c4
commit
97b32dd85d
1 changed files with 13 additions and 10 deletions
|
|
@ -487,11 +487,13 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
});
|
});
|
||||||
} else if (operation.action === "hideAttrViewName") {
|
} else if (operation.action === "hideAttrViewName") {
|
||||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
||||||
|
const titleElement = item.querySelector(".av__title");
|
||||||
|
if (titleElement) {
|
||||||
if (!operation.data) {
|
if (!operation.data) {
|
||||||
item.querySelector(".av__title").classList.remove("fn__none");
|
titleElement.classList.remove("fn__none");
|
||||||
} else {
|
} else {
|
||||||
// hide
|
// hide
|
||||||
item.querySelector(".av__title").classList.add("fn__none");
|
titleElement.classList.add("fn__none");
|
||||||
}
|
}
|
||||||
if (item.getAttribute("data-av-type") === "gallery") {
|
if (item.getAttribute("data-av-type") === "gallery") {
|
||||||
const galleryElement = item.querySelector(".av__gallery");
|
const galleryElement = item.querySelector(".av__gallery");
|
||||||
|
|
@ -502,6 +504,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
galleryElement.classList.add("av__gallery--top");
|
galleryElement.classList.add("av__gallery--top");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724
|
// 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue