🎨 Improve av

This commit is contained in:
Daniel 2025-09-01 12:15:40 +08:00
parent e015f72945
commit 50956851c8
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 35 additions and 14 deletions

View file

@ -23,7 +23,7 @@ import (
)
func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query string,
depth *int, renderedAttrViews map[string]*av.AttributeView) (ret *av.Table) {
depth *int, cachedAttrViews map[string]*av.AttributeView) (ret *av.Table) {
ret = &av.Table{
BaseInstance: av.NewViewBaseInstance(view),
Columns: []*av.TableColumn{},
@ -111,7 +111,7 @@ func RenderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
ials := BatchGetBlockAttrs(ialIDs)
// 渲染自动生成的字段值,比如关联、汇总、创建时间和更新时间
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, depth, renderedAttrViews)
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, depth, cachedAttrViews)
// 最后渲染模板字段,这样模板就可以使用汇总、关联、创建时间和更新时间的值了
renderTemplateErr := fillAttributeViewTemplateValues(attrView, view, ret, ials)