🐛 The selection options are inconsistent after pasting data into the database https://github.com/siyuan-note/siyuan/issues/11409

This commit is contained in:
Daniel 2024-05-15 22:10:26 +08:00
parent f205ab38df
commit 7182603791
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 27 additions and 2 deletions

View file

@ -120,6 +120,16 @@ func NewKey(id, name, icon string, keyType KeyType) *Key {
}
}
func (k *Key) GetOption(name string) (ret *SelectOption) {
for _, option := range k.Options {
if option.Name == name {
ret = option
return
}
}
return
}
type Date struct {
AutoFillNow bool `json:"autoFillNow"` // 是否自动填充当前时间 The database date field supports filling the current time by default https://github.com/siyuan-note/siyuan/issues/10823
}