Skip to content

Commit

Permalink
Fix #561
Browse files Browse the repository at this point in the history
DecimalPlaces为null时,使用值的默认文本格式,以支持显示小数。
  • Loading branch information
cuiliang committed Dec 8, 2020
1 parent 0088422 commit 7b62712
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ protected override void OnMouseWheel(MouseWheelEventArgs e)
private string CurrentText => string.IsNullOrWhiteSpace(ValueFormat)
? DecimalPlaces.HasValue
? Value.ToString($"#0.{new string('0', DecimalPlaces.Value)}")
: Value.ToString("#0")
: Value.ToString()
: Value.ToString(ValueFormat);

protected virtual void OnValueChanged(FunctionEventArgs<double> e) => RaiseEvent(e);
Expand Down

0 comments on commit 7b62712

Please sign in to comment.