An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Attribute View columns calculate https://github.com/siyuan-note/siyuan/issues/8699
Daniel6f57787fcf3a
diff --git a/kernel/av/av.go b/kernel/av/av.goindex 91b551fb61..1eb6877ce5 100644--- a/kernel/av/av.go+++ b/kernel/av/av.go@@ -24,6 +24,7 @@ import ("os""path/filepath""strconv"+ "strings""github.com/88250/gulu""github.com/88250/lute/ast"@@ -148,7 +149,8 @@ func NewFormattedValueNumber(content float64, format NumberFormat) (ret *ValueNucase NumberFormatNone:ret.FormattedContent = strconv.FormatFloat(content, 'f', -1, 64)case NumberFormatPercent:- ret.FormattedContent = strconv.FormatFloat(content*100, 'f', -1, 64) + "%"+ s := fmt.Sprintf("%.2f", content*100)+ ret.FormattedContent = strings.TrimRight(strings.TrimRight(s, "0"), ".") + "%"}return}@@ -158,7 +160,8 @@ func (number *ValueNumber) FormatNumber() {case NumberFormatNone:number.FormattedContent = strconv.FormatFloat(number.Content, 'f', -1, 64)case NumberFormatPercent:- number.FormattedContent = strconv.FormatFloat(number.Content*100, 'f', -1, 64) + "%"+ s := fmt.Sprintf("%.2f", number.Content*100)+ number.FormattedContent = strings.TrimRight(strings.TrimRight(s, "0"), ".") + "%"}}