Showing
1 changed file
with
18 additions
and
8 deletions
| @@ -38,6 +38,11 @@ export struct Card9Component { | @@ -38,6 +38,11 @@ export struct Card9Component { | ||
| 38 | Column() { | 38 | Column() { |
| 39 | // 顶部标题,最多两行 | 39 | // 顶部标题,最多两行 |
| 40 | if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) { | 40 | if (this.contentDTO.titleShow === 1 && this.contentDTO.newsTitle) { |
| 41 | + if (this.contentDTO.newTags) { | ||
| 42 | + Notes({ newTags: this.contentDTO.newTags }) | ||
| 43 | + } else if (this.contentDTO.objectType == '5') { | ||
| 44 | + Notes({ objectType: this.contentDTO.objectType }) | ||
| 45 | + } | ||
| 41 | Text() { | 46 | Text() { |
| 42 | if (this.titleMarked) { | 47 | if (this.titleMarked) { |
| 43 | Span(this.str01) | 48 | Span(this.str01) |
| @@ -48,13 +53,18 @@ export struct Card9Component { | @@ -48,13 +53,18 @@ export struct Card9Component { | ||
| 48 | Span(this.contentDTO.newsTitle) | 53 | Span(this.contentDTO.newsTitle) |
| 49 | } | 54 | } |
| 50 | } | 55 | } |
| 51 | - .fontColor(this.clicked ? 0x848484 : 0x222222) | ||
| 52 | - .width(CommonConstants.FULL_WIDTH) | ||
| 53 | - .fontSize($r('app.float.font_size_18')) | ||
| 54 | - .fontWeight(600) | ||
| 55 | - .maxLines(2) | ||
| 56 | - .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 57 | - .margin({ bottom: 19 }) | 56 | + .fontColor(this.clicked ? 0x848484 : 0x222222) |
| 57 | + .width(CommonConstants.FULL_WIDTH) | ||
| 58 | + .fontSize($r('app.float.font_size_18')) | ||
| 59 | + .fontWeight(600) | ||
| 60 | + .maxLines(2) | ||
| 61 | + .textOverflow({ overflow: TextOverflow.Ellipsis }) | ||
| 62 | + .margin({ bottom: 19 }) | ||
| 63 | + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : | ||
| 64 | + (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || | ||
| 65 | + this.contentDTO.objectType == '5' ? 30 : 0) | ||
| 66 | + .alignContent(Alignment.TopStart) | ||
| 67 | + | ||
| 58 | } | 68 | } |
| 59 | // 大图 | 69 | // 大图 |
| 60 | Stack() { | 70 | Stack() { |
| @@ -102,7 +112,7 @@ export struct Card9Component { | @@ -102,7 +112,7 @@ export struct Card9Component { | ||
| 102 | } | 112 | } |
| 103 | .width(CommonConstants.FULL_WIDTH) | 113 | .width(CommonConstants.FULL_WIDTH) |
| 104 | .padding({ | 114 | .padding({ |
| 105 | - top: 14, | 115 | + top: 5, |
| 106 | left: 16, | 116 | left: 16, |
| 107 | right: 16, | 117 | right: 16, |
| 108 | bottom: 14 | 118 | bottom: 14 |
-
Please register or login to post a comment