mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01:00
🎨 Add tags to the database when binding blocks to the database https://github.com/siyuan-note/siyuan/issues/15757
This commit is contained in:
parent
e91a37a98b
commit
4d8bc1672c
16 changed files with 124 additions and 36 deletions
|
|
@ -634,6 +634,15 @@ func (av *AttributeView) GetKey(keyID string) (ret *Key, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func (av *AttributeView) GetKeyByNameType(keyName string, typ KeyType) (ret []*Key) {
|
||||
for _, kv := range av.KeyValues {
|
||||
if kv.Key.Name == keyName && kv.Key.Type == typ {
|
||||
ret = append(ret, kv.Key)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (av *AttributeView) GetBlockKeyValues() (ret *KeyValues) {
|
||||
for _, kv := range av.KeyValues {
|
||||
if KeyTypeBlock == kv.Key.Type {
|
||||
|
|
|
|||
|
|
@ -673,7 +673,7 @@ func Round(val float64, precision int) float64 {
|
|||
|
||||
type ValueSelect struct {
|
||||
Content string `json:"content"`
|
||||
Color string `json:"color"`
|
||||
Color string `json:"color"` // 1-14
|
||||
}
|
||||
|
||||
func MSelectExistOption(mSelect []*ValueSelect, opt string) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue