陈剑华

feat: 标签高度和右图高度

@@ -77,15 +77,8 @@ export struct Card10Component { @@ -77,15 +77,8 @@ export struct Card10Component {
77 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 77 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
78 ProcessUtils.processPage(this.contentDTO) 78 ProcessUtils.processPage(this.contentDTO)
79 }) 79 })
80 - if(this.contentDTO.objectType == '5'){  
81 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center).margin({ left: 5, bottom: 5 })  
82 - } else {  
83 - if (this.contentDTO.seoTags) {  
84 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)  
85 - }  
86 - if (this.contentDTO.newTags) {  
87 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)  
88 - } 80 + if (this.contentDTO.objectType == '5') {
  81 + Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 })
89 } 82 }
90 }.alignContent(Alignment.BottomStart) 83 }.alignContent(Alignment.BottomStart)
91 84
@@ -135,15 +128,8 @@ export struct Card10Component { @@ -135,15 +128,8 @@ export struct Card10Component {
135 Row() { 128 Row() {
136 Column() { 129 Column() {
137 Stack() { 130 Stack() {
138 - if(this.contentDTO.objectType == '5'){  
139 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center)  
140 - } else {  
141 - if (this.contentDTO.seoTags) {  
142 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center)  
143 - }  
144 - if (this.contentDTO.newTags) {  
145 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center)  
146 - } 131 + if (item.objectType == '5') {
  132 + Notes({ objectType: 5 })
147 } 133 }
148 Text(item.newsTitle) 134 Text(item.newsTitle)
149 .fontSize($r('app.float.font_size_17')) 135 .fontSize($r('app.float.font_size_17'))
@@ -151,12 +137,10 @@ export struct Card10Component { @@ -151,12 +137,10 @@ export struct Card10Component {
151 .fontColor($r('app.color.color_222222')) 137 .fontColor($r('app.color.color_222222'))
152 .maxLines(2) 138 .maxLines(2)
153 .textOverflow({ overflow: TextOverflow.Ellipsis }) 139 .textOverflow({ overflow: TextOverflow.Ellipsis })
154 - .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 &&  
155 - (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5 ? 58 :  
156 - ((this.contentDTO.newTags?.length > 0 || this.contentDTO.seoTags?.length > 0) || this.contentDTO.objectType == '5') ? 35 :  
157 - 0 ) 140 + .textIndent(item.objectType == '5' ? 38 : 0)
158 }.alignContent(Alignment.TopStart) 141 }.alignContent(Alignment.TopStart)
159 142
  143 + Blank()
160 //bottom 评论等信息 144 //bottom 评论等信息
161 CardSourceInfo( 145 CardSourceInfo(
162 { 146 {
@@ -166,6 +150,7 @@ export struct Card10Component { @@ -166,6 +150,7 @@ export struct Card10Component {
166 ) 150 )
167 } 151 }
168 .layoutWeight(1) 152 .layoutWeight(1)
  153 + .height(78)
169 .alignItems(HorizontalAlign.Start) 154 .alignItems(HorizontalAlign.Start)
170 155
171 // 右侧图片 156 // 右侧图片
@@ -183,6 +168,7 @@ export struct Card10Component { @@ -183,6 +168,7 @@ export struct Card10Component {
183 }) 168 })
184 } 169 }
185 .alignContent(Alignment.BottomEnd) 170 .alignContent(Alignment.BottomEnd)
  171 + .height(78)
186 } 172 }
187 } 173 }
188 .padding({ top: 10, bottom: 10 }) 174 .padding({ top: 10, bottom: 10 })
@@ -39,13 +39,13 @@ export struct Card11Component { @@ -39,13 +39,13 @@ export struct Card11Component {
39 Column() { 39 Column() {
40 Stack() { 40 Stack() {
41 if(this.contentDTO.objectType == '5'){ 41 if(this.contentDTO.objectType == '5'){
42 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 42 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
43 } else { 43 } else {
44 if (this.contentDTO.seoTags) { 44 if (this.contentDTO.seoTags) {
45 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 45 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
46 } 46 }
47 if (this.contentDTO.newTags) { 47 if (this.contentDTO.newTags) {
48 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 48 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
49 } 49 }
50 } 50 }
51 Text() { 51 Text() {
@@ -61,13 +61,13 @@ export struct Card2Component { @@ -61,13 +61,13 @@ export struct Card2Component {
61 // } 61 // }
62 // } 62 // }
63 if(this.contentDTO.objectType == '5'){ 63 if(this.contentDTO.objectType == '5'){
64 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 64 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
65 } else { 65 } else {
66 if (this.contentDTO.seoTags) { 66 if (this.contentDTO.seoTags) {
67 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 67 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
68 } 68 }
69 if (this.contentDTO.newTags) { 69 if (this.contentDTO.newTags) {
70 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 70 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
71 } 71 }
72 } 72 }
73 //新闻标题 73 //新闻标题
@@ -42,13 +42,13 @@ export struct Card3Component { @@ -42,13 +42,13 @@ export struct Card3Component {
42 // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center) 42 // Notes({ objectType: this.contentDTO.objectType }).height(27).align(Alignment.Center)
43 // } 43 // }
44 if(this.contentDTO.objectType == '5'){ 44 if(this.contentDTO.objectType == '5'){
45 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 45 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
46 } else { 46 } else {
47 if (this.contentDTO.seoTags) { 47 if (this.contentDTO.seoTags) {
48 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 48 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
49 } 49 }
50 if (this.contentDTO.newTags) { 50 if (this.contentDTO.newTags) {
51 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 51 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
52 } 52 }
53 } 53 }
54 Text() { 54 Text() {
@@ -58,13 +58,13 @@ export struct Card5Component { @@ -58,13 +58,13 @@ export struct Card5Component {
58 Row() { 58 Row() {
59 Stack() { 59 Stack() {
60 if(this.contentDTO.objectType == '5'){ 60 if(this.contentDTO.objectType == '5'){
61 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 61 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
62 } else { 62 } else {
63 if (this.contentDTO.seoTags) { 63 if (this.contentDTO.seoTags) {
64 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 64 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
65 } 65 }
66 if (this.contentDTO.newTags) { 66 if (this.contentDTO.newTags) {
67 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 67 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
68 } 68 }
69 } 69 }
70 70
@@ -53,17 +53,16 @@ export struct Card6Component { @@ -53,17 +53,16 @@ export struct Card6Component {
53 // } 53 // }
54 Stack() { 54 Stack() {
55 if(this.contentDTO.objectType == '5'){ 55 if(this.contentDTO.objectType == '5'){
56 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 56 + Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center)
57 } else { 57 } else {
58 if (this.contentDTO.seoTags) { 58 if (this.contentDTO.seoTags) {
59 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 59 + Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center)
60 } 60 }
61 if (this.contentDTO.newTags) { 61 if (this.contentDTO.newTags) {
62 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 62 + Notes({ newTags: this.contentDTO.newTags }).height(28).align(Alignment.Center)
63 } 63 }
64 } 64 }
65 65
66 -  
67 Text() { 66 Text() {
68 if (this.titleMarked) { 67 if (this.titleMarked) {
69 ForEach(this.textArr, (textItem: textItem) => { 68 ForEach(this.textArr, (textItem: textItem) => {
@@ -89,14 +89,14 @@ export struct Card9Component { @@ -89,14 +89,14 @@ export struct Card9Component {
89 topRight: $r('app.float.image_border_radius') 89 topRight: $r('app.float.image_border_radius')
90 }) 90 })
91 if(this.contentDTO.objectType == '5'){ 91 if(this.contentDTO.objectType == '5'){
92 - Notes({ objectType: this.contentDTO.objectType }).align(Alignment.Center) 92 + Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center)
93 .margin({ left: 5, bottom: 5 }) 93 .margin({ left: 5, bottom: 5 })
94 } else { 94 } else {
95 if (this.contentDTO.seoTags) { 95 if (this.contentDTO.seoTags) {
96 - Notes({ newTags: this.contentDTO.seoTags }).align(Alignment.Center) 96 + Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center)
97 } 97 }
98 if (this.contentDTO.newTags) { 98 if (this.contentDTO.newTags) {
99 - Notes({ newTags: this.contentDTO.newTags }).align(Alignment.Center) 99 + Notes({ newTags: this.contentDTO.newTags }).height(20).align(Alignment.Center)
100 } 100 }
101 } 101 }
102 102