Browse Source

修改合约盈亏没有颜色

master
liaoxinyu 1 year ago
parent
commit
bdc89b9c6b
  1. 21
      pages/exchange/contract-history.vue

21
pages/exchange/contract-history.vue

@ -47,7 +47,7 @@
</div>
<div class="row d-flex m-y-mini justify-between">
<div class="label fn-sm">{{$t('contract.c7')}}</div>
<div class="color-light">{{item.profit*1||'--'}}</div>
<div :class="profitColor(item)">{{item.profit*1||'--'}}</div>
</div>
<div class="row d-flex m-y-mini justify-between">
<div class="label fn-sm">{{$t('contract.b3')}}</div>
@ -360,7 +360,15 @@ export default {
myCanvas.width=0
myCanvas.height=0
},
profitColor(item){
if(item && item.profit && item.profit.indexOf('-') === 0){
return 'red'
}else if(item.profit == null){
return 'black'
}else{
return 'green'
}
}
},
mounted() {
// this.generalizeInfo()
@ -404,4 +412,13 @@ export default {
/deep/ .share.vant-popup-index{
z-index: 100;
}
.red{
color: #ff231f;
}
.green{
color: #53b987;
}
.black{
color: white;
}
</style>

Loading…
Cancel
Save