🎨 数据库行数限制后添加行

This commit is contained in:
Vanessa 2023-12-13 17:31:39 +08:00
parent 290f39aed4
commit 5df68c9cea

View file

@ -90,6 +90,13 @@ export const insertAttrViewBlockAnimation = (blockElement: Element, srcIDs: stri
</div>`;
});
previousElement.insertAdjacentHTML("afterend", html);
const pageSize = parseInt(blockElement.getAttribute("data-page-size"))
if (pageSize) {
const currentCount = blockElement.querySelectorAll(".av__row:not(.av__row--header)").length
if (pageSize < currentCount) {
blockElement.setAttribute("data-page-size", currentCount.toString());
}
}
};
export const stickyRow = (blockElement: HTMLElement, elementRect: DOMRect, status: "top" | "bottom" | "all") => {