Skip to content

Commit

Permalink
fix: (LeekHub#428)优化statusBar底部profit小数展示
Browse files Browse the repository at this point in the history
  • Loading branch information
linminghuang committed Apr 10, 2024
1 parent ea9c914 commit 0191428
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/statusbar/Profit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export class ProfitStatusBar {
return prev + Number(cur.incomeTotal);
}, 0);
// Use the year, month, and day variables as needed
this.stockBarItem.text = `${PREFIX} ${allIncomeTotal} | ${allIncomeToday}`;
this.stockBarItem.text = `${PREFIX} ${parseFloat(allIncomeTotal.toFixed(2))} | ${parseFloat(allIncomeToday.toFixed(2))}`;
// this.stockBarItem.color = fundProfit >= 0 ? this.riseColor : this.fallColor;
this.stockBarItem.tooltip =
`「股票收益统计」 ${date}\r\n \r\n` +
Expand Down

0 comments on commit 0191428

Please sign in to comment.