mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 03:40:04 -06:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15527
This commit is contained in:
@@ -488,11 +488,14 @@ func fillAttributeViewTemplateValues(attrView *av.AttributeView, collection av.C
|
||||
switch value.Type {
|
||||
case av.KeyTypeTemplate: // 渲染模板字段
|
||||
keyValues := items[itemID]
|
||||
ial := map[string]string{}
|
||||
var ial map[string]string
|
||||
blockVal := item.GetBlockValue()
|
||||
if nil != blockVal {
|
||||
ial = ials[blockVal.Block.ID]
|
||||
}
|
||||
if nil == ial {
|
||||
ial = map[string]string{}
|
||||
}
|
||||
content, renderErr := RenderTemplateField(ial, keyValues, value.Template.Content)
|
||||
value.Template.Content = content
|
||||
if nil != renderErr {
|
||||
|
||||
Reference in New Issue
Block a user