🎨 Add Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9958

This commit is contained in:
Daniel 2023-12-30 23:35:43 +08:00
parent 59599472ba
commit 44f99c8fb6
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -757,8 +757,11 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
destVal.Number.Format = rollupKey.NumberFormat destVal.Number.Format = rollupKey.NumberFormat
destVal.Number.FormatNumber() destVal.Number.FormatNumber()
} }
cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destVal.String()) cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destVal.String())
} }
cell.Value.Rollup.RenderContents(rollupKey.Rollup.Calc)
case av.KeyTypeRelation: // 渲染关联列 case av.KeyTypeRelation: // 渲染关联列
relKey, _ := attrView.GetKey(cell.Value.KeyID) relKey, _ := attrView.GetKey(cell.Value.KeyID)
if nil != relKey && nil != relKey.Relation { if nil != relKey && nil != relKey.Relation {