942e6 fix scale input decimal value (#444)

* fix password reset bug

* fix default integer value on scale input
This commit is contained in:
Favour Olayinka
2024-06-10 12:23:18 +01:00
committed by GitHub
parent b0bad02b66
commit 1875faa123
2 changed files with 12 additions and 3 deletions

View File

@@ -17,7 +17,7 @@
role="button"
@click="setScale(i)"
>
{{ parseFloat(i).toFixed(2) }}
{{ formatNumber(i) }}
</div>
</div>
@@ -95,6 +95,15 @@ export default {
},
methods: {
formatNumber(num) {
if (Math.floor(num) === num) {
// return as Integer
return num
} else {
// Fformat to 2 decimal places
return parseFloat(num.toFixed(2))
}
},
btnStyle(isSelected) {
if (!isSelected) return {}
return {