🎨 The database rollup field supports using the template field https://github.com/siyuan-note/siyuan/issues/12384

This commit is contained in:
Daniel 2025-08-06 11:33:43 +08:00
parent bc16cd658f
commit f2dda8b389
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 22 additions and 10 deletions

View file

@ -22,7 +22,7 @@ import (
"github.com/siyuan-note/siyuan/kernel/util"
)
func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query string) (ret *av.Table) {
func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query string, depth *int) (ret *av.Table) {
ret = &av.Table{
BaseInstance: av.NewViewBaseInstance(view),
Columns: []*av.TableColumn{},
@ -107,7 +107,7 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
ials := BatchGetBlockAttrs(ialIDs)
// 渲染自动生成的列值,比如关联列、汇总列、创建时间列和更新时间列
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, rowsValues)
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, rowsValues, depth)
// 最后单独渲染模板列,这样模板列就可以使用汇总、关联、创建时间和更新时间列的值了
renderTemplateErr := fillAttributeViewTemplateValues(attrView, ret, ials, rowsValues)