mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-05 00:08:49 +01:00
This commit is contained in:
parent
2bd661b433
commit
fb5021a018
1 changed files with 6 additions and 2 deletions
|
|
@ -633,7 +633,9 @@ func (r *ValueRollup) RenderContents(calc *RollupCalc, destKey *Key) {
|
|||
}
|
||||
}
|
||||
}
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countChecked*100/len(r.Contents)), NumberFormatNone)}}
|
||||
if 0 < len(r.Contents) {
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countChecked*100/len(r.Contents)), NumberFormatNone)}}
|
||||
}
|
||||
case CalcOperatorPercentUnchecked:
|
||||
countUnchecked := 0
|
||||
for _, v := range r.Contents {
|
||||
|
|
@ -643,6 +645,8 @@ func (r *ValueRollup) RenderContents(calc *RollupCalc, destKey *Key) {
|
|||
}
|
||||
}
|
||||
}
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countUnchecked*100/len(r.Contents)), NumberFormatNone)}}
|
||||
if 0 < len(r.Contents) {
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countUnchecked*100/len(r.Contents)), NumberFormatNone)}}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue