Vanessa 2025-11-13 21:50:16 +08:00
parent 89e9b5f124
commit 42969db2ff

View file

@ -458,19 +458,19 @@ export const avRender = async (element: Element, protyle: IProtyle, cb?: (data:
const e = avElements[i] as HTMLElement; const e = avElements[i] as HTMLElement;
e.removeAttribute("data-rendering"); e.removeAttribute("data-rendering");
if (e.getAttribute("data-render") === "true" || hasClosestByClassName(e, "av__gallery-content")) { if (e.getAttribute("data-render") === "true" || hasClosestByClassName(e, "av__gallery-content")) {
return; continue;
} }
if (isMobile() || isInIOS() || isInAndroid() || isInHarmony()) { if (isMobile() || isInIOS() || isInAndroid() || isInHarmony()) {
e.classList.add("av--touch"); e.classList.add("av--touch");
} }
if (e.getAttribute("data-av-type") === "gallery") { if (e.getAttribute("data-av-type") === "gallery") {
renderGallery({blockElement: e, protyle, cb, renderAll}); await renderGallery({blockElement: e, protyle, cb, renderAll});
return; continue;
} }
if (e.getAttribute("data-av-type") === "kanban") { if (e.getAttribute("data-av-type") === "kanban") {
renderKanban({blockElement: e, protyle, cb, renderAll}); await renderKanban({blockElement: e, protyle, cb, renderAll});
return; continue;
} }
let selectCellId; let selectCellId;
@ -570,18 +570,18 @@ export const avRender = async (element: Element, protyle: IProtyle, cb?: (data:
} }
if (data.viewType === "gallery") { if (data.viewType === "gallery") {
e.setAttribute("data-av-type", data.viewType); e.setAttribute("data-av-type", data.viewType);
renderGallery({blockElement: e, protyle, cb, renderAll, data}); await renderGallery({blockElement: e, protyle, cb, renderAll, data});
return; continue;
} }
if (data.viewType === "kanban") { if (data.viewType === "kanban") {
e.setAttribute("data-av-type", data.viewType); e.setAttribute("data-av-type", data.viewType);
renderKanban({blockElement: e, protyle, cb, renderAll, data}); await renderKanban({blockElement: e, protyle, cb, renderAll, data});
return; continue;
} }
const view = data.view as IAVTable; const view = data.view as IAVTable;
if (view.groups?.length > 0) { if (view.groups?.length > 0) {
renderGroupTable({blockElement: e, protyle, cb, renderAll, data, resetData}); renderGroupTable({blockElement: e, protyle, cb, renderAll, data, resetData});
return; continue;
} }
const avBodyHTML = `<div class="av__body" data-group-id="" data-page-size="${view.pageSize}" style="float: left"> const avBodyHTML = `<div class="av__body" data-group-id="" data-page-size="${view.pageSize}" style="float: left">
${getTableHTMLs(view, e)} ${getTableHTMLs(view, e)}