|
|
|
@ -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; |
|
|
|
|