diff --git a/src/views/contract/exchange-store.vue b/src/views/contract/exchange-store.vue index cdf9479..41c2c86 100644 --- a/src/views/contract/exchange-store.vue +++ b/src/views/contract/exchange-store.vue @@ -108,11 +108,10 @@
@@ -231,11 +230,10 @@
@@ -388,8 +386,8 @@ export default { marginSell:0, checkboxBuy: false, checkboxSell: false, - activeStepBuy:0, - activeStepSell:0 + // activeStepBuy:0, + // activeStepSell:0 }; }, props: { @@ -489,16 +487,24 @@ export default { if (!item) return 0; return item.avail_position; }, - // activeStepBuy() { - // if (!this.buyform.amount || !this.maxNum) return 0; - // let num = (this.buyform.amount / this.maxNum) * 100; - // return num; - // }, - // activeStepSell() { - // if (!this.sellform.amount || !this.maxNum) return 0; - // let num = (this.sellform.amount / this.maxNum) * 100; - // return num; - // }, + activeStepBuy() { + let num = 0 + if (!this.buyform.amount || !this.maxNum){ + num = (this.buyform.amount / this.maxNum) * 100; + }else{ + num = (this.buyform.amount / this.maxNum) * 100; + } + return num; + }, + activeStepSell() { + let num = 0 + if (!this.sellform.amount || !this.maxNum){ + num = (this.sellform.amount / this.maxNum) * 100; + }else{ + num = (this.sellform.amount / this.maxNum) * 100; + } + return num; + }, // 保证金 // margin() { // if (!this.form.lever_rate) return '';