From bdb40223660cfa2352322215bb7c016605384b67 Mon Sep 17 00:00:00 2001 From: liaoxinyu Date: Mon, 25 Mar 2024 18:12:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8E=86=E5=8F=B2=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=9A=84=E7=9B=88=E4=BA=8F=E5=8F=98=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/exchange/contract-history.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pages/exchange/contract-history.vue b/pages/exchange/contract-history.vue index 6aaedd8..51ba5ba 100644 --- a/pages/exchange/contract-history.vue +++ b/pages/exchange/contract-history.vue @@ -47,7 +47,7 @@
{{$t('contract.c7')}}
-
{{item.profit*1||'--'}}
+
{{item.profit*1||'--'}}
{{$t('contract.b3')}}
@@ -360,7 +360,15 @@ export default { myCanvas.width=0 myCanvas.height=0 }, - + profitColor(item){ + if(item && item.profit && item.profit.startsWith('-')){ + 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: red; + } + .green{ + color: green; + } + .black{ + color: black; + }