在HTML页面中,我希望我的十进制数的输出只有两个位置而不是三个 - 例如:13.16而不是13.167。
但是当我尝试设置它时,它无法正常工作。如何使用下面的代码执行此操作?
currentJobStatus.push( cncActiveState[0].totaltime * 100 / Number(stdcycletime[0].Standard_Cycle_Time)).toFixed(1);
我尝试过使用toFixed(1)功能,但它无法正常工作。
这是我的node.js代码:
currentJobStatus.push( cncActiveState[0].totaltime * 100 / Number(stdcycletime[0].Standard_Cycle_Time)).toFixed(1);
这是我的angular.js代码:
<ngx-gauge
[type]="gaugeType"
value={{item.currentJobStatus}}
[thresholds]="thresholdConfig"
label=""
[append]="gaugeAppendText"
[thick]="8"
size="100"> </ngx-gauge>currentJobStatus在输出中给了我13.167,但我只想要13.16
皈依舞
阿波罗的战车
相关分类