mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-14 19:18:06 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/14511
This commit is contained in:
parent
334e80f8d5
commit
7bd690ecec
2 changed files with 35 additions and 16 deletions
|
|
@ -582,6 +582,19 @@ func (av *AttributeView) ExistBoundBlock(nodeID string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (av *AttributeView) GetBlockValueByBoundID(nodeID string) *Value {
|
||||
for _, kv := range av.KeyValues {
|
||||
if KeyTypeBlock == kv.Key.Type {
|
||||
for _, v := range kv.Values {
|
||||
if v.Block.ID == nodeID {
|
||||
return v
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (av *AttributeView) GetValue(keyID, itemID string) (ret *Value) {
|
||||
for _, kv := range av.KeyValues {
|
||||
if kv.Key.ID == keyID {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue