Vanessa 2025-09-04 18:23:51 +08:00
parent e91a37a98b
commit ba95f45b92
3 changed files with 5 additions and 0 deletions

View file

@ -517,6 +517,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type
html = `<input type="number" spellcheck="false" value="${cellElements[0].firstElementChild.getAttribute("data-content")}" ${style} class="b3-text-field">`;
} else {
if (["select", "mSelect"].includes(type)) {
if (blockElement.getAttribute("data-rendering") === "true") {
return;
}
openMenuPanel({protyle, blockElement, type: "select", cellElements});
} else if (type === "mAsset") {
openMenuPanel({protyle, blockElement, type: "asset", cellElements});

View file

@ -451,6 +451,7 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: (data: IAV) =
}
if (avElements.length > 0) {
avElements.forEach((e: HTMLElement) => {
e.removeAttribute("data-rendering");
if (e.getAttribute("data-render") === "true" || hasClosestByClassName(e, "av__gallery-content")) {
return;
}

View file

@ -633,6 +633,7 @@ export const addColOptionOrCell = (protyle: IProtyle, data: IAV, cellElements: H
transaction(protyle, cellDoOperations, cellUndoOperations);
}
if (colData.type === "select") {
blockElement.setAttribute("data-rendering", "true");
menuElement.parentElement.dispatchEvent(new CustomEvent("click", {detail: "close"}));
} else {
const oldScroll = menuElement.querySelector(".b3-menu__items").scrollTop;