export const avRender = (element: Element) => { let avElements: Element[] = []; if (element.getAttribute("data-type") === "NodeAttributeView") { // 编辑器内代码块编辑渲染 avElements = [element]; } else { avElements = Array.from(element.querySelectorAll('[data-type="NodeAttributeView"]')); } if (avElements.length === 0) { return; } if (avElements.length > 0) { avElements.forEach((e: HTMLDivElement) => { if (e.getAttribute("data-render") === "true") { return; } const data = { title: "table", filter: {}, sorts: {}, columns: [{ width: 500, icon: "", id: "", name: "columnA", wrap: false, type: "", }, { width: 500, icon: "", id: "", name: "columnB", wrap: false, type: "", }], rows: [{ id: "", cells: [{ value: "a", }, { color: "var(--b3-card-error-color)", bgColor: "var(--b3-card-error-background)", value: "a1", }] }, { id: "", cells: [{ color: "var(--b3-card-success-color)", bgColor: "var(--b3-card-success-background)", value: "b", }, { value: "b1", }] }] }; let tableHTML = "