mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-25 16:34:06 +01:00
🎨 Improve av https://github.com/siyuan-note/siyuan/issues/14511
This commit is contained in:
parent
0220f38d94
commit
548ae028cc
5 changed files with 16 additions and 16 deletions
|
|
@ -564,9 +564,9 @@ func (av *AttributeView) GetCurrentView(viewID string) (ret *View, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (av *AttributeView) ExistBlock(blockID string) bool {
|
||||
func (av *AttributeView) ExistItem(itemID string) bool {
|
||||
for _, blockVal := range av.GetBlockKeyValues().Values {
|
||||
if blockVal.BlockID == blockID {
|
||||
if blockVal.BlockID == itemID {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
@ -582,11 +582,11 @@ func (av *AttributeView) ExistBoundBlock(nodeID string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (av *AttributeView) GetValue(keyID, blockID string) (ret *Value) {
|
||||
func (av *AttributeView) GetValue(keyID, itemID string) (ret *Value) {
|
||||
for _, kv := range av.KeyValues {
|
||||
if kv.Key.ID == keyID {
|
||||
for _, v := range kv.Values {
|
||||
if v.BlockID == blockID {
|
||||
if v.BlockID == itemID {
|
||||
ret = v
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue