Showing
3 changed files
with
27 additions
and
22 deletions
| @@ -40,9 +40,9 @@ export struct Card11Component { | @@ -40,9 +40,9 @@ export struct Card11Component { | ||
| 40 | Column() { | 40 | Column() { |
| 41 | Stack() { | 41 | Stack() { |
| 42 | if (this.contentDTO.newTags) { | 42 | if (this.contentDTO.newTags) { |
| 43 | - Notes({ newTags: this.contentDTO.newTags }).height(27).align(Alignment.Center) | 43 | + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center) |
| 44 | } else if (this.contentDTO.objectType == '5') { | 44 | } else if (this.contentDTO.objectType == '5') { |
| 45 | - Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) | 45 | + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) |
| 46 | } | 46 | } |
| 47 | Text() { | 47 | Text() { |
| 48 | if (this.titleMarked) { | 48 | if (this.titleMarked) { |
| @@ -49,9 +49,11 @@ export struct Card2Component { | @@ -49,9 +49,11 @@ export struct Card2Component { | ||
| 49 | Stack() { | 49 | Stack() { |
| 50 | //新闻标题 | 50 | //新闻标题 |
| 51 | if (this.contentDTO.newTags) { | 51 | if (this.contentDTO.newTags) { |
| 52 | - Notes({ newTags: this.contentDTO.newTags }) | 52 | + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center) |
| 53 | + //Notes({ newTags: this.contentDTO.newTags }) | ||
| 53 | } else if (this.contentDTO.objectType == '5') { | 54 | } else if (this.contentDTO.objectType == '5') { |
| 54 | - Notes({ objectType: this.contentDTO.objectType }) | 55 | + Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) |
| 56 | + //Notes({ objectType: this.contentDTO.objectType }) | ||
| 55 | } | 57 | } |
| 56 | 58 | ||
| 57 | Text() { | 59 | Text() { |
| @@ -45,29 +45,32 @@ export struct Card4Component { | @@ -45,29 +45,32 @@ export struct Card4Component { | ||
| 45 | Column() { | 45 | Column() { |
| 46 | //body | 46 | //body |
| 47 | Column() { | 47 | Column() { |
| 48 | - //新闻标题 | ||
| 49 | - if (this.contentDTO.newTags) { | ||
| 50 | - Notes({ newTags: this.contentDTO.newTags }) | ||
| 51 | - } else if (this.contentDTO.objectType == '5') { | ||
| 52 | - Notes({ objectType: this.contentDTO.objectType }) | ||
| 53 | - } | ||
| 54 | - Text() { | ||
| 55 | - if (this.titleMarked) { | ||
| 56 | - Span(this.str01) | ||
| 57 | - Span(this.str02) | ||
| 58 | - .fontColor(0xED2800) | ||
| 59 | - Span(this.str03) | ||
| 60 | - } else { | ||
| 61 | - Span(this.contentDTO.newsTitle) | 48 | + Stack() { |
| 49 | + if (this.contentDTO.newTags) { | ||
| 50 | + Notes({ newTags: this.contentDTO.newTags }).height(19).align(Alignment.Center) | ||
| 51 | + } else if (this.contentDTO.objectType == '5') { | ||
| 52 | + Notes({ objectType: this.contentDTO.objectType }).height(19).align(Alignment.Center) | ||
| 53 | + } | ||
| 54 | + Text() { | ||
| 55 | + if (this.titleMarked) { | ||
| 56 | + Span(this.str01) | ||
| 57 | + Span(this.str02) | ||
| 58 | + .fontColor(0xED2800) | ||
| 59 | + Span(this.str03) | ||
| 60 | + } else { | ||
| 61 | + Span(this.contentDTO.newsTitle) | ||
| 62 | + } | ||
| 62 | } | 63 | } |
| 63 | - } | ||
| 64 | .fontSize($r('app.float.font_size_18')) | 64 | .fontSize($r('app.float.font_size_18')) |
| 65 | .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) | 65 | .fontColor(this.clicked ? 0x848484 : $r('app.color.color_222222')) |
| 66 | .maxLines(3) | 66 | .maxLines(3) |
| 67 | .textOverflow({ overflow: TextOverflow.Ellipsis }) | 67 | .textOverflow({ overflow: TextOverflow.Ellipsis }) |
| 68 | - .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : | ||
| 69 | - (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || | ||
| 70 | - this.contentDTO.objectType == '5' ? 30 : 0) | 68 | + .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : |
| 69 | + (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || | ||
| 70 | + this.contentDTO.objectType == '5' ? 30 : 0) | ||
| 71 | + }.alignContent(Alignment.TopStart) | ||
| 72 | + //新闻标题 | ||
| 73 | + | ||
| 71 | //三图 | 74 | //三图 |
| 72 | Stack(){ | 75 | Stack(){ |
| 73 | Row() { | 76 | Row() { |
-
Please register or login to post a comment