Showing
2 changed files
with
16 additions
and
6 deletions
| @@ -44,6 +44,7 @@ export struct CompParser { | @@ -44,6 +44,7 @@ export struct CompParser { | ||
| 44 | aboutToAppear(): void { | 44 | aboutToAppear(): void { |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | + | ||
| 47 | console.log('CompParser-compDTO', JSON.stringify(this.compDTO)) | 48 | console.log('CompParser-compDTO', JSON.stringify(this.compDTO)) |
| 48 | // 轮播图屏蔽音频类型稿件 | 49 | // 轮播图屏蔽音频类型稿件 |
| 49 | if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { | 50 | if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { |
| @@ -93,7 +94,7 @@ export struct CompParser { | @@ -93,7 +94,7 @@ export struct CompParser { | ||
| 93 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" | 94 | this.compDTO.imageScale === 2) { // && compDTO.name ==="横划卡" |
| 94 | 95 | ||
| 95 | LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 96 | LiveHorizontalCardComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 96 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 97 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 97 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { | 98 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_01 && this.compDTO.imageScale === 3) { |
| 98 | if (this.compDTO.operDataList.length > 1) { | 99 | if (this.compDTO.operDataList.length > 1) { |
| 99 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 100 | HorizontalStrokeCardThreeTwoRadioForMoreComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| @@ -103,7 +104,7 @@ export struct CompParser { | @@ -103,7 +104,7 @@ export struct CompParser { | ||
| 103 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 104 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| 104 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { | 105 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { |
| 105 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 106 | ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 106 | - Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 107 | + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) |
| 107 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { | 108 | } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_03) { |
| 108 | ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) | 109 | ZhSingleRow03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) |
| 109 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) | 110 | Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) |
| @@ -18,6 +18,7 @@ const TAG: string = 'Card6Component-Card13Component'; | @@ -18,6 +18,7 @@ const TAG: string = 'Card6Component-Card13Component'; | ||
| 18 | @Component | 18 | @Component |
| 19 | export struct Card6Component { | 19 | export struct Card6Component { |
| 20 | @State pageId: string = ''; | 20 | @State pageId: string = ''; |
| 21 | + @State textHeight: number = 0 ; //获取文本的高度 | ||
| 21 | @State pageName: string = ''; | 22 | @State pageName: string = ''; |
| 22 | @State loadImg: boolean = false; | 23 | @State loadImg: boolean = false; |
| 23 | @State clicked: boolean = false; | 24 | @State clicked: boolean = false; |
| @@ -63,7 +64,9 @@ export struct Card6Component { | @@ -63,7 +64,9 @@ export struct Card6Component { | ||
| 63 | } | 64 | } |
| 64 | } | 65 | } |
| 65 | 66 | ||
| 66 | - Text() { | 67 | + Text() |
| 68 | + { | ||
| 69 | + | ||
| 67 | if (this.titleMarked) { | 70 | if (this.titleMarked) { |
| 68 | ForEach(this.textArr, (textItem: textItem) => { | 71 | ForEach(this.textArr, (textItem: textItem) => { |
| 69 | if (textItem.isRed) { | 72 | if (textItem.isRed) { |
| @@ -77,11 +80,12 @@ export struct Card6Component { | @@ -77,11 +80,12 @@ export struct Card6Component { | ||
| 77 | Span(this.contentDTO.newsTitle) | 80 | Span(this.contentDTO.newsTitle) |
| 78 | } | 81 | } |
| 79 | } | 82 | } |
| 83 | + | ||
| 80 | .fontColor(this.clicked ? 0x848484 : 0x222222) | 84 | .fontColor(this.clicked ? 0x848484 : 0x222222) |
| 81 | .fontSize(18) | 85 | .fontSize(18) |
| 82 | .lineHeight(27) | 86 | .lineHeight(27) |
| 83 | .fontWeight(FontWeight.Normal) | 87 | .fontWeight(FontWeight.Normal) |
| 84 | - .maxLines(3) | 88 | + .maxLines(2) |
| 85 | .alignSelf(ItemAlign.Start) | 89 | .alignSelf(ItemAlign.Start) |
| 86 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | 90 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 |
| 87 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | 91 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && |
| @@ -89,7 +93,7 @@ export struct Card6Component { | @@ -89,7 +93,7 @@ export struct Card6Component { | ||
| 89 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 : | 93 | ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 : |
| 90 | 0 ) | 94 | 0 ) |
| 91 | }.alignContent(Alignment.TopStart) | 95 | }.alignContent(Alignment.TopStart) |
| 92 | - // .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 60: 156) | 96 | + |
| 93 | 97 | ||
| 94 | } | 98 | } |
| 95 | .justifyContent(FlexAlign.Start) | 99 | .justifyContent(FlexAlign.Start) |
| @@ -98,8 +102,12 @@ export struct Card6Component { | @@ -98,8 +102,12 @@ export struct Card6Component { | ||
| 98 | CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) | 102 | CardSourceInfo({ compDTO: this.compDTO, contentDTO: this.contentDTO }) |
| 99 | 103 | ||
| 100 | } | 104 | } |
| 105 | + | ||
| 101 | .alignItems(HorizontalAlign.Start) | 106 | .alignItems(HorizontalAlign.Start) |
| 102 | - .justifyContent(FlexAlign.Start) | 107 | + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78: 156) |
| 108 | + | ||
| 109 | + | ||
| 110 | + .justifyContent(FlexAlign.SpaceBetween) | ||
| 103 | .width('64%') | 111 | .width('64%') |
| 104 | 112 | ||
| 105 | 113 | ||
| @@ -132,3 +140,4 @@ export struct Card6Component { | @@ -132,3 +140,4 @@ export struct Card6Component { | ||
| 132 | .alignItems(VerticalAlign.Top) | 140 | .alignItems(VerticalAlign.Top) |
| 133 | } | 141 | } |
| 134 | } | 142 | } |
| 143 | + |
-
Please register or login to post a comment