Browse Source

修改百分比为小数点

master
liaoxinyu 2 years ago
parent
commit
e9c50938c4
  1. 14
      pages/exchange/open-position.vue

14
pages/exchange/open-position.vue

@ -53,8 +53,7 @@
{{ $t("contract.d6") }} {{ $t("contract.d6") }}
<van-icon @click="popshow=true" class="color-theme-1 m-l-xs" name="info-o"/> <van-icon @click="popshow=true" class="color-theme-1 m-l-xs" name="info-o"/>
</view> </view>
<!-- <view class="num color-light fn-right" style="margin-top:8px;">{{accountInfo.riskRate || "0%"}} --> <view class="num color-light fn-right" style="margin-top:8px;">{{accountInfo.riskRate || "0%"}}
<view class="num color-light fn-right" style="margin-top:8px;">{{riskRate || "0%"}}
</view> </view>
</view> </view>
</view> </view>
@ -487,8 +486,7 @@
<view class="w-50 fn-right"> <view class="w-50 fn-right">
<view class="label">{{ $t("contract.h0") }}</view> <view class="label">{{ $t("contract.h0") }}</view>
<view class="color-light" :class="item.unRealProfit>0?'color-buy':'color-sell'"> <view class="color-light" :class="item.unRealProfit>0?'color-buy':'color-sell'">
<!-- {{item.profitRate}} --> {{item.profitRate}}
{{avg_price1(item.profitRate)}}
</view> </view>
</view> </view>
</view> </view>
@ -934,14 +932,6 @@ export default {
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return parts.join(","); return parts.join(",");
} }
},
riskRate(){
if (this.accountInfo.riskRate) {
let price = this.accountInfo.riskRate;
let parts = price.split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return parts.join(",");
}
} }
}, },
watch: { watch: {

Loading…
Cancel
Save