This commit is contained in:
Vanessa 2023-10-12 17:34:19 +08:00
parent 2dd558b609
commit 70e82cd981
2 changed files with 14 additions and 1 deletions

View File

@ -364,7 +364,7 @@ export const addAttrViewColAnimation = (options: {
<div class="av__widthdrag"></div>
</div>`;
} else {
html = '<div class="av__cell" style="width: 200px"></div>';
html = '<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>';
}
previousElement.insertAdjacentHTML("afterend", html);
});

View File

@ -21,6 +21,19 @@ export const avRender = (element: Element, protyle: IProtyle, cb?: () => void) =
if (e.getAttribute("data-render") === "true") {
return;
}
if (e.firstElementChild.innerHTML === "") {
let html = "";
[1, 2, 3].forEach(item => {
html += `<div class="av__row">
<div style="width: 24px"></div>
<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>
<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>
<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>
<div class="av__cell" style="width: 200px"><span class="av__pulse"></span></div>
</div>`;
})
e.firstElementChild.innerHTML = html
}
const left = e.querySelector(".av__scroll")?.scrollLeft || 0;
const headerTransform = (e.querySelector(".av__row--header") as HTMLElement)?.style.transform;
const footerTransform = (e.querySelector(".av__row--footer") as HTMLElement)?.style.transform;