Showing
1 changed file
with
18 additions
and
9 deletions
| @@ -185,7 +185,25 @@ export struct CommentIconComponent { | @@ -185,7 +185,25 @@ export struct CommentIconComponent { | ||
| 185 | Image(this.styleType == 1 ? $r('app.media.comment_icon') : | 185 | Image(this.styleType == 1 ? $r('app.media.comment_icon') : |
| 186 | $r('app.media.comment_icon_white')).width(24).height(24) | 186 | $r('app.media.comment_icon_white')).width(24).height(24) |
| 187 | // Stack({alignContent:Alignment.Start}) { | 187 | // Stack({alignContent:Alignment.Start}) { |
| 188 | + | ||
| 189 | + if (this.showMainText) { | ||
| 190 | + this.commentIcon() | ||
| 191 | + }else { | ||
| 188 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { | 192 | if (Number.parseInt(this.publishCommentModel.totalCommentNumer) != 0) { |
| 193 | + this.commentIcon() | ||
| 194 | + } | ||
| 195 | + } | ||
| 196 | + } | ||
| 197 | + } | ||
| 198 | + .width(24) | ||
| 199 | + .height(24) | ||
| 200 | + .visibility(this.contentDetail.appstyle !== 9 ? Visibility.Visible : Visibility.Hidden) | ||
| 201 | + | ||
| 202 | + // .backgroundColor(Color.Blue) | ||
| 203 | + } | ||
| 204 | + | ||
| 205 | + @Builder | ||
| 206 | + commentIcon() { | ||
| 189 | RelativeContainer() { | 207 | RelativeContainer() { |
| 190 | Image(this.styleType == 1 ? this.showMainText?$r('app.media.comment_icon_text_bg'):$r('app.media.comment_icon_number_bg') : this.showMainText?$r('app.media.comment_icon_text_block_bg'):$r('app.media.ic_like_back_Select')) | 208 | Image(this.styleType == 1 ? this.showMainText?$r('app.media.comment_icon_text_bg'):$r('app.media.comment_icon_number_bg') : this.showMainText?$r('app.media.comment_icon_text_block_bg'):$r('app.media.ic_like_back_Select')) |
| 191 | .objectFit(ImageFit.Fill) | 209 | .objectFit(ImageFit.Fill) |
| @@ -231,15 +249,6 @@ export struct CommentIconComponent { | @@ -231,15 +249,6 @@ export struct CommentIconComponent { | ||
| 231 | x: this.showMainText?8:12, | 249 | x: this.showMainText?8:12, |
| 232 | y: -2 | 250 | y: -2 |
| 233 | }) | 251 | }) |
| 234 | - | ||
| 235 | - } | ||
| 236 | - } | ||
| 237 | - } | ||
| 238 | - .width(24) | ||
| 239 | - .height(24) | ||
| 240 | - .visibility(this.contentDetail.appstyle !== 9 ? Visibility.Visible : Visibility.Hidden) | ||
| 241 | - | ||
| 242 | - // .backgroundColor(Color.Blue) | ||
| 243 | } | 252 | } |
| 244 | 253 | ||
| 245 | private getMeasureText(text: string) { | 254 | private getMeasureText(text: string) { |
-
Please register or login to post a comment