mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 Update attr panel for av
This commit is contained in:
parent
d257caff8d
commit
1590913db7
2 changed files with 8 additions and 5 deletions
|
|
@ -123,10 +123,6 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
|
|||
|
||||
var keyValues []*av.KeyValues
|
||||
for _, kv := range attrView.KeyValues {
|
||||
if av.KeyTypeBlock == kv.Key.Type {
|
||||
continue
|
||||
}
|
||||
|
||||
kValues := &av.KeyValues{Key: kv.Key}
|
||||
for _, v := range kv.Values {
|
||||
if v.BlockID == blockID {
|
||||
|
|
@ -180,7 +176,11 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
|
|||
switch kv.Key.Type {
|
||||
case av.KeyTypeTemplate:
|
||||
if 0 < len(kv.Values) {
|
||||
ial := GetBlockAttrs(blockID)
|
||||
ial := map[string]string{}
|
||||
block := getRowBlockValue(keyValues)
|
||||
if !block.IsDetached {
|
||||
ial = GetBlockAttrs(blockID)
|
||||
}
|
||||
kv.Values[0].Template.Content = renderTemplateCol(ial, kv.Key.Template, keyValues)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue