This commit is contained in:
Daniel 2025-08-14 00:00:57 +08:00
parent b78e2edfb8
commit 176308d7d2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 25 additions and 15 deletions

View file

@ -19,7 +19,7 @@ import (
)
func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query string,
depth *int, renderedAttrViews map[string]*av.AttributeView) (ret *av.Gallery) {
depth *int, renderedAttrViews map[string]*av.AttributeView, renderedTemplateKeyCollections map[string]av.Collection) (ret *av.Gallery) {
ret = &av.Gallery{
BaseInstance: av.NewViewBaseInstance(view),
CoverFrom: view.Gallery.CoverFrom,
@ -115,7 +115,7 @@ func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query
ials := BatchGetBlockAttrsWitTrees(ialIDs, boundTrees)
// 渲染自动生成的字段值,比如关联、汇总、创建时间和更新时间
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, cardsValues, depth, renderedAttrViews)
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, cardsValues, depth, renderedAttrViews, renderedTemplateKeyCollections)
// 最后单独渲染模板字段,这样模板就可以使用汇总、关联、创建时间和更新时间的值了
renderTemplateErr := fillAttributeViewTemplateValues(attrView, ret, ials, cardsValues)