This commit is contained in:
Vanessa 2023-11-14 23:18:18 +08:00
parent 6a4ed3c92b
commit aac7fa8101
14 changed files with 37 additions and 37 deletions

View file

@ -24,7 +24,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
if (item.dataset.render !== "true") {
return;
}
const scrollRect = item.querySelector(".av__scroll").getBoundingClientRect()
const scrollRect = item.querySelector(".av__scroll").getBoundingClientRect();
const headerElement = item.querySelector(".av__row--header") as HTMLElement;
if (headerElement) {
const distance = Math.floor(elementRect.top - scrollRect.top);