Skip to content

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

:art: https://github.com/siyuan-note/siyuan/issues/15077

Vanessa6c5cacabde6e
diff --git a/app/src/protyle/render/av/blockAttr.ts b/app/src/protyle/render/av/blockAttr.ts
index 0f31f8b2ab..563fe7458e 100644
--- a/app/src/protyle/render/av/blockAttr.ts
+++ b/app/src/protyle/render/av/blockAttr.ts
@@ -206,7 +206,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
innerHTML += `<div class="fn__hr"></div>
<button data-type="addColumn" class="b3-button b3-button--cancel"><svg><use xlink:href="#iconAdd"></use></svg>${window.siyuan.languages.newCol}</button>
<div class="fn__hr--b"></div><div class="fn__hr--b"></div>`;
- html += `<div data-av-id="${table.avID}" data-node-id="${id}" data-type="NodeAttributeView">${innerHTML}</div>`;
+ html += `<div data-av-id="${table.avID}" data-av-type="table" data-node-id="${id}" data-type="NodeAttributeView">${innerHTML}</div>`;
if (element.innerHTML) {
// 防止 blockElement 找不到
diff --git a/app/src/protyle/render/av/row.ts b/app/src/protyle/render/av/row.ts
index 68f610485e..188e980317 100644
--- a/app/src/protyle/render/av/row.ts
+++ b/app/src/protyle/render/av/row.ts
@@ -18,6 +18,9 @@ import {insertGalleryItemAnimation} from "./gallery/item";
import {clearSelect} from "../../util/clearSelect";
export const getFieldIdByCellElement = (cellElement: Element, viewType: TAVView): string => {
+ if (hasClosestByClassName(cellElement, "custom-attr")) {
+ return (hasClosestByClassName(cellElement, "av__row") as HTMLElement).dataset.id;
+ }
return (hasClosestByClassName(cellElement, viewType === "table" ? "av__row" : "av__gallery-item") as HTMLElement).dataset.id;
};