Showing
1 changed file
with
8 additions
and
17 deletions
| @@ -91,29 +91,19 @@ export struct CardSourceInfo { | @@ -91,29 +91,19 @@ export struct CardSourceInfo { | ||
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | build() { | 93 | build() { |
| 94 | - Flex({ alignItems: ItemAlign.Center }) { | 94 | + Flex({ justifyContent: FlexAlign.Start, direction: FlexDirection.Row }) { |
| 95 | // 标签 | 95 | // 标签 |
| 96 | - if (this.contentDTO.corner) { | ||
| 97 | - Text(this.contentDTO.corner) | ||
| 98 | - .fontSize($r("app.float.font_size_11")) | ||
| 99 | - .fontColor($r("app.color.color_ED2800")) | ||
| 100 | - .margin({ right: 6 }) | ||
| 101 | - } | ||
| 102 | - if (this.contentDTO.cornerMark) { | ||
| 103 | - Text(this.contentDTO.cornerMark) | 96 | + if (this.contentDTO.cornerMark || this.contentDTO.corner) { |
| 97 | + Text(this.contentDTO.cornerMark || this.contentDTO.corner) | ||
| 104 | .fontSize($r("app.float.font_size_11")) | 98 | .fontSize($r("app.float.font_size_11")) |
| 105 | .fontColor($r("app.color.color_ED2800")) | 99 | .fontColor($r("app.color.color_ED2800")) |
| 106 | .margin({ right: 6 }) | 100 | .margin({ right: 6 }) |
| 101 | + .flexShrink(0) | ||
| 107 | } | 102 | } |
| 103 | + | ||
| 108 | // 来源信息 | 104 | // 来源信息 |
| 109 | - if (this.contentDTO.rmhPlatform === 1) { | ||
| 110 | - Text(this.contentDTO.rmhInfo?.rmhName) | ||
| 111 | - .fontSize($r("app.float.font_size_11")) | ||
| 112 | - .fontColor($r("app.color.color_B0B0B0")) | ||
| 113 | - .maxLines(1) | ||
| 114 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 115 | - } else if (this.contentDTO.source) { | ||
| 116 | - Text(`${this.contentDTO.source}`) | 105 | + if (this.contentDTO.rmhPlatform === 1 || this.contentDTO.source) { |
| 106 | + Text(this.contentDTO.rmhPlatform === 1 ? this.contentDTO.rmhInfo?.rmhName : this.contentDTO.source) | ||
| 117 | .fontSize($r("app.float.font_size_11")) | 107 | .fontSize($r("app.float.font_size_11")) |
| 118 | .fontColor($r("app.color.color_B0B0B0")) | 108 | .fontColor($r("app.color.color_B0B0B0")) |
| 119 | .maxLines(1) | 109 | .maxLines(1) |
| @@ -169,6 +159,7 @@ export struct CardSourceInfo { | @@ -169,6 +159,7 @@ export struct CardSourceInfo { | ||
| 169 | 159 | ||
| 170 | } | 160 | } |
| 171 | .width(CommonConstants.FULL_WIDTH) | 161 | .width(CommonConstants.FULL_WIDTH) |
| 162 | + .height(16) | ||
| 172 | .margin({ top: this.viewShowData ? 8 : 0 }) | 163 | .margin({ top: this.viewShowData ? 8 : 0 }) |
| 173 | } | 164 | } |
| 174 | 165 |
-
Please register or login to post a comment