订单详情页面总技保持两位小数
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
<view></view>
|
||||
<view>
|
||||
<text>总计¥</text>
|
||||
<text class="font-bold u-font-32">{{allPrice*1+seatFeePrice*1}}</text>
|
||||
<text class="font-bold u-font-32">{{to2(allPrice*1+seatFeePrice*1) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-m-t-30">
|
||||
@@ -122,7 +122,14 @@
|
||||
} from 'vue';
|
||||
import color from '@/commons/color.js'
|
||||
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
||||
|
||||
|
||||
function to2(n){
|
||||
if(!n){
|
||||
return 0
|
||||
}
|
||||
return n.toFixed(2)
|
||||
}
|
||||
|
||||
function tuicai(item, index) {
|
||||
emits('tuicai', item, index)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user