Browse Source

修改合约保证金为2位小数点

master
liaoxinyu 1 year ago
parent
commit
bfc8cc2cb4
  1. 15
      src/views/contract/exchange-store.vue

15
src/views/contract/exchange-store.vue

@ -99,6 +99,8 @@
class="form-control"
v-model="marginBuy"
:placeholder="tips"
@input="inputEnter(false)"
title=""
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
@ -222,6 +224,8 @@
class="form-control"
v-model="marginSell"
:placeholder="tips"
@input="inputEnter(true)"
title=""
/>
<!-- <div class="input-group-append">
<span class="input-group-text">{{ $t("contract.e2") }}</span>
@ -525,6 +529,17 @@ export default {
}
},
methods: {
inputEnter(boll) {
if(boll){
this.marginSell = this.marginSell
.replace(/[^\d.]/g, "") //
.replace(/^(\d*\.?\d{0,2}).*$/, "$1"); //
}else{
this.marginBuy = this.marginBuy
.replace(/[^\d.]/g, "") //
.replace(/^(\d*\.?\d{0,2}).*$/, "$1"); //
}
},
//
contractAccount(boo) {
if (!this.isLogin) return;

Loading…
Cancel
Save