Fix: JS计数计算精确度问题
This commit is contained in:
@@ -148,7 +148,7 @@ export default {
|
|||||||
return this.twoList['unusable'].length
|
return this.twoList['unusable'].length
|
||||||
},
|
},
|
||||||
computePrice() {
|
computePrice() {
|
||||||
return this.currentPrice - this.selectItem.couponPrice
|
return this.force2Decimal(this.currentPrice - this.selectItem.couponPrice)
|
||||||
},
|
},
|
||||||
maxIndex() {
|
maxIndex() {
|
||||||
const maxIndex = this.list.reduce((a, b, c) => {
|
const maxIndex = this.list.reduce((a, b, c) => {
|
||||||
@@ -163,6 +163,9 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
force2Decimal(value) {
|
||||||
|
return this.$force2Decimal(value);
|
||||||
|
},
|
||||||
changeNav(index) {
|
changeNav(index) {
|
||||||
this.current = index
|
this.current = index
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user