Browse Source

合约盘口小数点处理

master
luyisha 3 years ago
parent
commit
e53f38639e
  1. 18
      src/views/contract/handicap.vue

18
src/views/contract/handicap.vue

@ -169,18 +169,22 @@ export default {
};
},
sellListShow() {
let list = this.sellList.splice(0, 12);
let total = 0;
list.forEach(item => {
item.total = total += item.amount;
});
return list.reverse();
let list = this.sellList.splice(0, 12);
let total = 0;
list.forEach(item => {
// item.total = total += item.amount;
item.total = total += Number(item.amount);
item.total = item.total.toFixed(3)
});
return list.reverse();
},
buyListShow() {
let list = this.buyList.splice(0, 12);
let total = 0;
list.forEach(item => {
item.total = total += item.amount;
// item.total = total += item.amount;
item.total = total += Number(item.amount);
item.total = item.total.toFixed(3);
});
return list;
}

Loading…
Cancel
Save