🎨 数据库不能设置布局

This commit is contained in:
Vanessa 2023-10-14 10:01:42 +08:00
parent 69d8c93c98
commit 7d6f9bb0df
4 changed files with 41 additions and 16 deletions

View file

@ -44,8 +44,8 @@ export const resize = (protyle: IProtyle) => {
}
if (abs.padding > MIN_ABS || abs.width > MIN_ABS || isNaN(abs.padding)) {
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
item.style.width = item.parentElement.clientWidth + "px";
if (item.getAttribute("data-render") === "true") {
item.style.maxWidth = item.parentElement.clientWidth + "px";
if (item.getAttribute("data-render") === "true" && !item.style.width.endsWith("%")) {
const paddingLeft = item.parentElement.style.paddingLeft;
const paddingRight = item.parentElement.style.paddingRight;
const avHeaderElement = item.firstElementChild.firstElementChild as HTMLElement;