Showing
1 changed file
with
8 additions
and
6 deletions
| @@ -40,7 +40,7 @@ export struct DynamicDetailComponent { | @@ -40,7 +40,7 @@ export struct DynamicDetailComponent { | ||
| 40 | scroller: Scroller = new Scroller(); | 40 | scroller: Scroller = new Scroller(); |
| 41 | 41 | ||
| 42 | //点赞 收藏 评论 数量 | 42 | //点赞 收藏 评论 数量 |
| 43 | - @State interactDataDTO: InteractDataDTO = {} as InteractDataDTO | 43 | + @State interactDataDTO: InteractDataDTO = {likeNum:0} as InteractDataDTO |
| 44 | /** | 44 | /** |
| 45 | * 关注状态:默认未关注 点击去关注 | 45 | * 关注状态:默认未关注 点击去关注 |
| 46 | */ | 46 | */ |
| @@ -333,11 +333,13 @@ export struct DynamicDetailComponent { | @@ -333,11 +333,13 @@ export struct DynamicDetailComponent { | ||
| 333 | .width($r('app.float.margin_24')) | 333 | .width($r('app.float.margin_24')) |
| 334 | .height($r('app.float.margin_24')) | 334 | .height($r('app.float.margin_24')) |
| 335 | .objectFit(ImageFit.Cover) | 335 | .objectFit(ImageFit.Cover) |
| 336 | - Text(NumberFormatterUtils.formatNumberWithWan(this.interactDataDTO?.likeNum)) | ||
| 337 | - .fontColor($r('app.color.color_999999')) | ||
| 338 | - .fontSize($r('app.float.font_size_16')) | ||
| 339 | - .lineHeight($r('app.float.margin_20')) | ||
| 340 | - .margin({ left: $r('app.float.margin_2')}) | 336 | + if(this.interactDataDTO?.likeNum != 0){ |
| 337 | + Text(NumberFormatterUtils.formatNumberWithWan(this.interactDataDTO?.likeNum)) | ||
| 338 | + .fontColor($r('app.color.color_999999')) | ||
| 339 | + .fontSize($r('app.float.font_size_16')) | ||
| 340 | + .lineHeight($r('app.float.margin_20')) | ||
| 341 | + .margin({ left: $r('app.float.margin_2')}) | ||
| 342 | + } | ||
| 341 | Blank().layoutWeight(1) | 343 | Blank().layoutWeight(1) |
| 342 | } | 344 | } |
| 343 | .width($r('app.float.margin_154')) | 345 | .width($r('app.float.margin_154')) |
-
Please register or login to post a comment