Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:lipstick: 加载更多和 resize 时需要调整数据库视图表头和尾

Vanessa2e63c1f0c8af
diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts
index bd8123bab4..42f2c390ea 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 6dfe2e2495..6a8189da2e 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) => {