| | |
| | | v-model="amount" |
| | | step-strictly="true" |
| | | :min="0" |
| | | :max="maxAmount" |
| | | @change="inputChange" |
| | | /> |
| | | |
| | |
| | | //滑块事件 |
| | | sliderAmountChange(val) { |
| | | let data; |
| | | if (this.maxAmount) { |
| | | console.log(val, "sliderAmountChange"); |
| | | |
| | | // if (val) { |
| | | // if (val == 0) { |
| | | // this.amount = undefined; |
| | | // } else { |
| | |
| | | // const maxAmount = |
| | | // this.walletMoney * this.initOpen.amount * this.lever_rate; |
| | | const maxAmount = |
| | | Math.floor(this.walletMoney / (1 + sxf)) * this.lever_rate; |
| | | const fl = maxAmount * sxf; |
| | | console.log(maxAmount * rate, fl); |
| | | Math.floor((this.walletMoney / (1 + sxf)) * rate) * this.lever_rate; |
| | | // const fl = maxAmount * sxf; |
| | | console.log(maxAmount * rate); |
| | | |
| | | // data = maxAmount * rate - fl; |
| | | data = maxAmount; |
| | | |
| | | // this.maxAmount = maxAmount; |
| | | // if (this.lever_rate) { |
| | | // data = math.format((this.maxAmount * rate), 2); |
| | | // } else { |
| | | // data = math.format((this.maxAmount * rate) / 1, 2); |
| | | // } |
| | | this.amount = parseInt(data); |
| | | this.amount = data; |
| | | // } |
| | | this.$emit("getAmount", this.amount); |
| | | } |
| | | // } |
| | | }, |
| | | emptyValue() { |
| | | this.sliderAmount = 0; |