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

Vanessabbd49a7b19f4
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index f2c53013a3..5c753bbeef 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -993,14 +993,20 @@ export const renderCell = (cellValue: IAVCellValue, rowIndex = 0, showIcon = tru
}
text += "</div>";
} else if (cellValue.type === "rollup") {
+ let rollupType;
cellValue?.rollup?.contents?.forEach((item) => {
- const rollupText = ["template", "select", "mSelect", "mAsset", "checkbox", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item, showIcon);
+ const rollupText = ["template", "select", "mSelect", "mAsset", "relation"].includes(item.type) ? renderCell(item, rowIndex, showIcon, type) : renderRollup(item, showIcon);
if (rollupText) {
- text += rollupText + ", ";
+ text += rollupText + (item.type === "checkbox" ? "" : ", ");
}
+ rollupType = item.type;
});
- if (text && text.endsWith(", ")) {
- text = text.substring(0, text.length - 2);
+ if (text) {
+ if (rollupType === "checkbox") {
+ text = `<div class="fn__flex">${text}</div>`;
+ } else if (text.endsWith(", ")) {
+ text = text.substring(0, text.length - 2);
+ }
}
} else if (cellValue.type === "relation") {
cellValue?.relation?.contents?.forEach((item, index) => {
@@ -1050,6 +1056,8 @@ const renderRollup = (cellValue: IAVCellValue, showIcon: boolean) => {
}
} else if (cellValue.type === "number") {
text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || "";
+ } else if (cellValue.type === "checkbox") {
+ text += `<svg class="av__checkbox"><use xlink:href="#icon${cellValue?.checkbox?.checked ? "Check" : "Uncheck"}"></use></svg><span class="fn__space"></span>`;
} else if (["date", "updated", "created"].includes(cellValue.type)) {
const dataValue = cellValue ? cellValue[cellValue.type as "date"] : null;
if (dataValue.formattedContent) {