Browse Source

更新选择百分比

master
TorsenLi 5 days ago
parent
commit
300095853f
  1. 16
      src/views/exchangeStock/make-deal.vue

16
src/views/exchangeStock/make-deal.vue

@ -374,8 +374,7 @@ export default {
if (!this.isMarket) {
return Math.multiple(this.buyorder.entrust_price, this.buyorder.amount);
} else {
// return this.cacheTotal;
return Math.multiple(this.buyorder.entrust_price, this.buyorder.amount);
return this.cacheTotal;
}
},
set(val) {
@ -383,9 +382,8 @@ export default {
if (!this.isMarket) {
this.buyorder.amount = Math.division(val, this.buyorder.entrust_price);
} else { //
// this.cacheTotal = val;
// this.buyorder.amount = this.cacheTotal
this.buyorder.amount = Math.division(val, this.buyorder.entrust_price,6);
this.cacheTotal = val;
this.buyorder.amount = this.cacheTotal;
}
}
},
@ -548,9 +546,7 @@ export default {
renderBuyAmount(val, index) {
// console.Info(val)
// console.Info(this.buyorder)
if (!this.buyorder.entrust_price) {
if (!this.isMarket && !this.buyorder.entrust_price) {
this.visibles.buy.limitPrice = true;
this.msgList.buy[1] = this.$t('nav.set');
this.clearAll();
@ -644,9 +640,7 @@ export default {
this.buyorder.amount = 0;
this.sellorder.amount = 0;
// totalset
// this.buyTotal = 0;
// this.cacheTotal = 0;
this.cacheTotal = 0;
//
this.buyPercentIndex = -1;

Loading…
Cancel
Save