diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index bd8123bab..42f2c390e 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -128,6 +128,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle event.stopPropagation(); return true; } else if (type === "av-load-more") { + (blockElement.querySelector(".av__row--footer") as HTMLElement).style.transform = ""; blockElement.removeAttribute("data-render"); blockElement.dataset.pageSize = (parseInt(blockElement.dataset.pageSize) + parseInt(blockElement.querySelector('[data-type="set-page-size"]').getAttribute("data-size"))).toString(); avRender(blockElement, protyle); diff --git a/app/src/protyle/util/resize.ts b/app/src/protyle/util/resize.ts index 6dfe2e249..6a8189da2 100644 --- a/app/src/protyle/util/resize.ts +++ b/app/src/protyle/util/resize.ts @@ -3,6 +3,7 @@ import {setPadding} from "../ui/initUI"; import {hasClosestBlock} from "./hasClosest"; import {Constants} from "../../constants"; import {lineNumberRender} from "../render/highlightRender"; +import {stickyRow} from "../render/av/row"; export const resize = (protyle: IProtyle) => { hideElements(["gutter"], protyle); @@ -10,6 +11,14 @@ export const resize = (protyle: IProtyle) => { const MIN_ABS = 4; // 不能 clearTimeout,否则 split 时左侧无法 resize setTimeout(() => { + if(!protyle.disabled) { + const contentRect = protyle.contentElement.getBoundingClientRect(); + protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => { + if (item.querySelector(".av__title")) { + stickyRow(item, contentRect, "all"); + } + }); + } if (abs.width > MIN_ABS || isNaN(abs.width)) { if (typeof window.echarts !== "undefined") { protyle.wysiwyg.element.querySelectorAll('[data-subtype="echarts"], [data-subtype="mindmap"]').forEach((chartItem: HTMLElement) => {