Browse Source

合约历史记录没有颜色

master
liaoxinyu 1 year ago
parent
commit
b394a4d4ef
  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.avg_price||'--'}}/{{ item.entrust_price || "--" }}</td>
<td>{{ item.margin * 1 }}</td> <td>{{ item.margin * 1 }}</td>
<td>{{ item.fee * 1 }}</td> <td>{{ item.fee * 1 }}</td>
<td> <td :class="profite(item)">
{{item.profit||'--'}} {{item.profit||'--'}}
</td> </td>
<!-- <td> <!-- <td>
@ -181,7 +181,27 @@ export default {
this.order_details = res; this.order_details = res;
$("#history").modal("show"); $("#history").modal("show");
}); });
} },
profite(item){
if(item && item.profit && item.profit.indexOf('-') === 0){
return 'red';
}else if(item.profit==null){
return 'white';
}else{
return 'green';
}
}
} }
}; };
</script> </script>
<style scoped>
.red{
color: red;
}
.green{
color: green;
}
.white{
color: #797979;
}
</style>
Loading…
Cancel
Save