Fix: JS计数计算精确度问题

This commit is contained in:
modendeveloper
2024-09-11 23:11:51 +08:00
parent 384d7ccae1
commit 06658209eb
+4 -1
View File
@@ -148,7 +148,7 @@ export default {
return this.twoList['unusable'].length
},
computePrice() {
return this.currentPrice - this.selectItem.couponPrice
return this.force2Decimal(this.currentPrice - this.selectItem.couponPrice)
},
maxIndex() {
const maxIndex = this.list.reduce((a, b, c) => {
@@ -163,6 +163,9 @@ export default {
},
methods: {
force2Decimal(value) {
return this.$force2Decimal(value);
},
changeNav(index) {
this.current = index
},