From 9143bb8a2fec3e861287c2c8c2b47fc941baada3 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 30 Jun 2023 16:26:35 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/7536 --- app/src/protyle/render/av/render.ts | 14 +++++++++++++- app/src/types/index.d.ts | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 30f5ed8fb..d4b197015 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) => {
`; row.cells.forEach((cell, index) => { - tableHTML += `
${cell.renderValue?.content || ""}
`; + 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 += `
${text}
`; }); tableHTML += "
"; }); diff --git a/app/src/types/index.d.ts b/app/src/types/index.d.ts index 4966f9910..28f7865f6 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 }