This commit is contained in:
Daniel 2025-08-21 17:55:18 +08:00
parent 2899e3851d
commit bbc788cfa5
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -225,6 +225,10 @@ func getAttrViewAddingBlockDefaultValues(attrView *av.AttributeView, view, group
newValue.Block.Content = content newValue.Block.Content = content
case av.KeyTypeText: case av.KeyTypeText:
newValue.Text.Content = content newValue.Text.Content = content
case av.KeyTypeNumber:
num, _ := strconv.ParseFloat(strings.Split(content, " - ")[0], 64)
newValue.Number.Content = num
newValue.Number.IsNotEmpty = true
case av.KeyTypeURL: case av.KeyTypeURL:
newValue.URL.Content = content newValue.URL.Content = content
case av.KeyTypeEmail: case av.KeyTypeEmail: