This commit is contained in:
Vanessa 2023-10-21 23:49:28 +08:00
parent bbb1abb7c6
commit af35b8ba57
17 changed files with 37 additions and 43 deletions

View file

@ -52,7 +52,7 @@ export const resize = (protyle: IProtyle) => {
export const resizeAV = (item: HTMLElement) => {
if (!item.classList.contains("av") || item.getAttribute("data-render") !== "true") {
return
return;
}
if (item.style.width.endsWith("%") || item.style.margin) {
const avHeaderElement = item.firstElementChild.firstElementChild as HTMLElement;
@ -63,7 +63,7 @@ export const resizeAV = (item: HTMLElement) => {
avBodyElement.style.paddingRight = "";
item.style.alignSelf = "";
if (!item.style.width.endsWith("%")) {
item.style.width = ""
item.style.width = "";
item.style.maxWidth = "100%";
}
} else {
@ -81,4 +81,4 @@ export const resizeAV = (item: HTMLElement) => {
item.style.maxWidth = "";
}
}
}
};