Browse Source

修改拖动条

master
liaoxinyu 2 years ago
parent
commit
0f5c17f148
  1. 42
      src/views/contract/exchange-store.vue

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

@ -108,11 +108,10 @@
<!-- :value="activeStepBuy"
@input="sliderChangeBuy" -->
<el-slider
v-model="activeStepBuy"
@change="sliderChangeBuy"
:value="activeStepBuy"
@input="sliderChangeBuy"
:format-tooltip="tooltip"
:marks="marks"
:step="25"
></el-slider>
</div>
<div class="d-flex justify-content-between mb-3 color_7c fn-10">
@ -231,11 +230,10 @@
<!-- :value="activeStepSell"
@input="sliderChangeSell" -->
<el-slider
v-model="activeStepSell"
@change="sliderChangeSell"
:value="activeStepSell"
@input="sliderChangeSell"
:format-tooltip="tooltip"
:marks="marks"
:step="25"
></el-slider>
</div>
<div class="d-flex justify-content-between mb-3 color_7c fn-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 '';

Loading…
Cancel
Save