fix: 安装费环比固定显示一位小数 #604
@ -521,10 +521,10 @@
|
||||
|
||||
var rate = Number(changeRate);
|
||||
if (rate > 0) {
|
||||
trend.textContent = '↑' + Math.abs(rate).toLocaleString('zh-CN', { maximumFractionDigits: 1 }) + '%';
|
||||
trend.textContent = '↑' + Math.abs(rate).toLocaleString('zh-CN', { minimumFractionDigits: 1, maximumFractionDigits: 1 }) + '%';
|
||||
trend.classList.add('is-up');
|
||||
} else if (rate < 0) {
|
||||
trend.textContent = '↓' + Math.abs(rate).toLocaleString('zh-CN', { maximumFractionDigits: 1 }) + '%';
|
||||
trend.textContent = '↓' + Math.abs(rate).toLocaleString('zh-CN', { minimumFractionDigits: 1, maximumFractionDigits: 1 }) + '%';
|
||||
trend.classList.add('is-down');
|
||||
} else {
|
||||
trend.textContent = '持平';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user