Browse Source

修改盈亏颜色

master
liaoxinyu 1 year ago
parent
commit
0c29d41547
  1. 24
      src/views/contract/history-commission.vue

24
src/views/contract/history-commission.vue

@ -28,7 +28,7 @@
<td>{{item.avg_price||'--'}}/{{ item.entrust_price || "--" }}</td>
<td>{{ item.margin * 1 }}</td>
<td>{{ item.fee * 1 }}</td>
<td>
<td :class="color_text(item)">
{{item.profit||'--'}}
</td>
<!-- <td>
@ -181,7 +181,27 @@ export default {
this.order_details = res;
$("#history").modal("show");
});
}
},
color_text(item){
if (item && item.profit && item.profit.indexOf('-') === 0) {
return 'red'
}else if(item.profit == null){
return 'black'
}else{
return 'green'
}
}
}
};
</script>
<style lang="scss" scoped>
.red{
color: #ff231f;
}
.green{
color: #53b987;
}
.black{
color: #797979;
}
</style>

Loading…
Cancel
Save