Browse Source

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

Vanessa 1 năm trước cách đây
mục cha
commit
0910f52a9d
2 tập tin đã thay đổi với 7 bổ sung0 xóa
  1. 4 0
      app/src/protyle/render/av/cell.ts
  2. 3 0
      app/src/types/index.d.ts

+ 4 - 0
app/src/protyle/render/av/cell.ts

@@ -643,6 +643,10 @@ export const renderCell = (cellValue: IAVCellValue, wrap: boolean) => {
         });
     } else if (cellValue.type === "checkbox") {
         text += `<svg class="av__checkbox"><use xlink:href="#icon${cellValue?.checkbox?.checked ? "Check" : "Uncheck"}"></use></svg>`;
+    } else if (cellValue.type === "rollup") {
+        cellValue?.rollup?.contents?.forEach((item) => {
+            text += `<span class="av__celltext--ref" style="margin-right: 8px">${item}</span>`;
+        });
     } else if (cellValue.type === "relation") {
         cellValue?.relation?.contents?.forEach((item, index) => {
             text += `<span class="av__celltext--ref" style="margin-right: 8px" data-id="${cellValue?.relation?.blockIDs[index]}">${item}</span>`;

+ 3 - 0
app/src/types/index.d.ts

@@ -1143,6 +1143,9 @@ interface IAVCellValue {
         blockIDs: string[]
         contents?: string[]
     }
+    rollup?: {
+        contents?: string[]
+    }
     date?: IAVCellDateValue
     created?: IAVCellDateValue
     updated?: IAVCellDateValue