🎨 Improve database attribute panel number field formating

This commit is contained in:
Daniel 2024-09-16 12:04:23 +08:00
parent 92ddab06ea
commit abdfd6699e
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -545,6 +545,13 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
kValues.Values = append(kValues.Values, &av.Value{ID: ast.NewNodeID(), KeyID: kValues.Key.ID, BlockID: blockID, Type: av.KeyTypeCreated})
case av.KeyTypeUpdated:
kValues.Values = append(kValues.Values, &av.Value{ID: ast.NewNodeID(), KeyID: kValues.Key.ID, BlockID: blockID, Type: av.KeyTypeUpdated})
case av.KeyTypeNumber:
for _, v := range kValues.Values {
if nil != v.Number {
v.Number.Format = kValues.Key.NumberFormat
v.Number.FormatNumber()
}
}
}
if 0 < len(kValues.Values) {