mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/15527
This commit is contained in:
parent
c3c467e3ee
commit
93fdc69bec
2 changed files with 8 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue