소스 검색

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

Vanessa 1 년 전
부모
커밋
0910f52a9d
2개의 변경된 파일7개의 추가작업 그리고 0개의 파일을 삭제
  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") {
     } else if (cellValue.type === "checkbox") {
         text += `<svg class="av__checkbox"><use xlink:href="#icon${cellValue?.checkbox?.checked ? "Check" : "Uncheck"}"></use></svg>`;
         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") {
     } else if (cellValue.type === "relation") {
         cellValue?.relation?.contents?.forEach((item, index) => {
         cellValue?.relation?.contents?.forEach((item, index) => {
             text += `<span class="av__celltext--ref" style="margin-right: 8px" data-id="${cellValue?.relation?.blockIDs[index]}">${item}</span>`;
             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[]
         blockIDs: string[]
         contents?: string[]
         contents?: string[]
     }
     }
+    rollup?: {
+        contents?: string[]
+    }
     date?: IAVCellDateValue
     date?: IAVCellDateValue
     created?: IAVCellDateValue
     created?: IAVCellDateValue
     updated?: IAVCellDateValue
     updated?: IAVCellDateValue