This commit is contained in:
Vanessa 2023-06-30 23:57:11 +08:00
parent 21d4eea41b
commit 24c57bc647
10 changed files with 155 additions and 46 deletions

View file

@ -26,7 +26,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
if (item.parentElement.classList.contains("protyle-wysiwyg")) {
const headerTop = item.offsetTop - 30 + 56; // 30 - 面包屑, 56 - tab+title
const headerTop = item.offsetTop + 48;
const headerElement = item.querySelector(".av__row--header") as HTMLElement;
if (headerElement) {
if (headerTop < element.scrollTop && headerTop + headerElement.parentElement.clientHeight > element.scrollTop) {