| | |
| | | <div class="erty tghj"> |
| | | <input |
| | | :placeholder="$t('hj262')" |
| | | type="number" |
| | | type="text" |
| | | :minlength="4" |
| | | class="inpy" |
| | | v-model="num" |
| | | @input="num = num.replace(/^(0+)|[^\d]+/g, '')" |
| | | @input="priceinput" |
| | | /> |
| | | <a>{{ $t("hj274") }}</a> |
| | | </div> |
| | |
| | | |
| | | export default { |
| | | methods: { |
| | | priceinput(e){ |
| | | this.num = this.num.replace(/^(0+)|[^\d]+/g, '') |
| | | var maxnum = this.enableAmt/this.currentItem.nowPrice |
| | | if(this.num>=maxnum){ |
| | | this.num = Math.floor(maxnum) |
| | | } |
| | | }, |
| | | async getxiadan() { |
| | | if (!this.num) { |
| | | this.show = false; |
| | |
| | | this.$toast(this.$t("hj264")); |
| | | return; |
| | | } |
| | | |
| | | var opt = { |
| | | stockCode: this.currentItem.code, |
| | | password: this.password, |