mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🎨 Improve av
This commit is contained in:
parent
cd10072554
commit
b78e2edfb8
4 changed files with 22 additions and 17 deletions
|
|
@ -18,7 +18,8 @@ import (
|
|||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query string, depth *int) (ret *av.Gallery) {
|
||||
func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query string,
|
||||
depth *int, renderedAttrViews map[string]*av.AttributeView) (ret *av.Gallery) {
|
||||
ret = &av.Gallery{
|
||||
BaseInstance: av.NewViewBaseInstance(view),
|
||||
CoverFrom: view.Gallery.CoverFrom,
|
||||
|
|
@ -114,7 +115,7 @@ func RenderAttributeViewGallery(attrView *av.AttributeView, view *av.View, query
|
|||
ials := BatchGetBlockAttrsWitTrees(ialIDs, boundTrees)
|
||||
|
||||
// 渲染自动生成的字段值,比如关联、汇总、创建时间和更新时间
|
||||
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, cardsValues, depth)
|
||||
fillAttributeViewAutoGeneratedValues(attrView, ret, ials, cardsValues, depth, renderedAttrViews)
|
||||
|
||||
// 最后单独渲染模板字段,这样模板就可以使用汇总、关联、创建时间和更新时间的值了
|
||||
renderTemplateErr := fillAttributeViewTemplateValues(attrView, ret, ials, cardsValues)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue