Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Improve av https://github.com/siyuan-note/siyuan/issues/15644

Danielbbc788cfa5bc
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index d2971250b9..e47cc7bedb 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -225,6 +225,10 @@ func getAttrViewAddingBlockDefaultValues(attrView *av.AttributeView, view, group
newValue.Block.Content = content
case av.KeyTypeText:
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:
newValue.URL.Content = content
case av.KeyTypeEmail: