🎨 Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049

This commit is contained in:
Daniel 2024-12-21 12:00:02 +08:00
parent be6f3a237d
commit 776b4fd6ee
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 41 additions and 4 deletions

View file

@ -195,6 +195,15 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
for _, row := range ret.Rows {
for _, cell := range row.Cells {
switch cell.ValueType {
case av.KeyTypeBlock: // 对于主键可能需要填充静态锚文本 Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049
if nil != cell.Value.Block {
for k, v := range ials[row.ID] {
if k == av.NodeAttrViewStaticText+"-"+attrView.ID {
cell.Value.Block.Content = v
break
}
}
}
case av.KeyTypeRollup: // 渲染汇总列
rollupKey, _ := attrView.GetKey(cell.Value.KeyID)
if nil == rollupKey || nil == rollupKey.Rollup {