change number toFixed decimal

This commit is contained in:
Muhammad Izza Alfiansyah 2024-07-09 14:40:59 +07:00
parent b296500acb
commit fcf1173ced
2 changed files with 5 additions and 7 deletions

View File

@ -309,7 +309,7 @@ export default function () {
</div> </div>
<div> <div>
<div class="text-base">Temperatur</div> <div class="text-base">Temperatur</div>
<div class="text-3xl mt-2">{suhu().toFixed(2)} C</div> <div class="text-3xl mt-2">{suhu().toFixed(1)} C</div>
</div> </div>
</div> </div>
<div class="bg-white rounded shadow min-h-24 flex flex-row items-center gap-5 p-5"> <div class="bg-white rounded shadow min-h-24 flex flex-row items-center gap-5 p-5">
@ -318,9 +318,7 @@ export default function () {
</div> </div>
<div> <div>
<div class="text-base">Kelembaban</div> <div class="text-base">Kelembaban</div>
<div class="text-3xl mt-2"> <div class="text-3xl mt-2">{kelembaban().toFixed(1)} %</div>
{kelembaban().toString().slice(0, 4)} %
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -174,9 +174,9 @@ export default function () {
getDates(item.created_time), getDates(item.created_time),
getTimes(item.created_time).slice(0, 5), getTimes(item.created_time).slice(0, 5),
getLamaJam(item.created_time), getLamaJam(item.created_time),
item.kadar_gas.toString().slice(0, 4) + " %", item.kadar_gas.toFixed(1) + " %",
item.suhu.toString().slice(0, 4) + " C", item.suhu.toFixed(1) + " C",
item.kelembaban.toString().slice(0, 4) + " %", item.kelembaban.toFixed(1) + " %",
])} ])}
></Table> ></Table>
</div> </div>