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/7536

Vanessa9143bb8a2fec
diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts
index 30f5ed8fb6..d4b1970150 100644
--- a/app/src/protyle/render/av/render.ts
+++ b/app/src/protyle/render/av/render.ts
@@ -48,7 +48,19 @@ export const avRender = (element: Element, cb?: () => void) => {
</div>
<div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div>`;
row.cells.forEach((cell, index) => {
- tableHTML += `<div class="av__cell" ${index === 0 ? 'data-block-id="' + (cell.renderValue?.id || "") + '"' : ""} data-id="${cell.id}" data-index="${index}" style="width: ${data.columns[index].width || 200}px;${cell.bgColor ? `background-color:${cell.bgColor};` : ""}${cell.color ? `color:${cell.color};` : ""}">${cell.renderValue?.content || ""}</div>`;
+ let text: string
+ if (cell.valueType === "text") {
+ text = cell.renderValue as string || ""
+ } else if (cell.valueType === "block") {
+ text = (cell.renderValue as {
+ content: string,
+ id: string,
+ }).content as string || ""
+ }
+ tableHTML += `<div class="av__cell" ${index === 0 ? 'data-block-id="' + ((cell.renderValue as {
+ content: string,
+ id: string
+ }).id || "") + '"' : ""} data-id="${cell.id}" data-index="${index}" style="width: ${data.columns[index].width || 200}px;${cell.bgColor ? `background-color:${cell.bgColor};` : ""}${cell.color ? `color:${cell.color};` : ""}">${text}</div>`;
});
tableHTML += "<div></div></div>";
});
diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts
index 4966f99104..28f7865f67 100644
--- a/app/src/types/index.d.ts
+++ b/app/src/types/index.d.ts
@@ -837,8 +837,9 @@ interface IAVCell {
color: string,
bgColor: string,
value: string,
+ valueType: TAVCol,
renderValue: {
content: string,
id: string,
- }
+ } | string
}