Showing
1 changed file
with
6 additions
and
2 deletions
| @@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent { | @@ -99,6 +99,10 @@ export struct LiveHorizontalCardComponent { | ||
| 99 | this.loadImg = await onlyWifiLoadImg(); | 99 | this.loadImg = await onlyWifiLoadImg(); |
| 100 | } | 100 | } |
| 101 | 101 | ||
| 102 | + showMore() { | ||
| 103 | + return !!this.compDTO.dataSourceType || !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '') | ||
| 104 | + } | ||
| 105 | + | ||
| 102 | 106 | ||
| 103 | build() { | 107 | build() { |
| 104 | Column() { | 108 | Column() { |
| @@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent { | @@ -114,7 +118,7 @@ export struct LiveHorizontalCardComponent { | ||
| 114 | .fontWeight(600) | 118 | .fontWeight(600) |
| 115 | } | 119 | } |
| 116 | 120 | ||
| 117 | - if (this.compDTO.dataSourceType === 'LIVE_HORIZONTAL_CARD' || this.compDTO.dataSourceType === 'LIVE_MONTHLY_RANKING' || this.compDTO.dataSourceType === 'OBJECT_POS') { | 121 | + if (this.showMore()) { |
| 118 | Row() { | 122 | Row() { |
| 119 | Text("更多") | 123 | Text("更多") |
| 120 | .fontSize($r("app.float.font_size_14")) | 124 | .fontSize($r("app.float.font_size_14")) |
| @@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent { | @@ -175,7 +179,7 @@ export struct LiveHorizontalCardComponent { | ||
| 175 | }) | 179 | }) |
| 176 | }) | 180 | }) |
| 177 | } | 181 | } |
| 178 | - if (this.compDTO.operDataList.length >= 2 && !(this.compDTO?.objectType === '0' || this.compDTO?.objectType === '')) { | 182 | + if (this.compDTO.operDataList.length >= 2 && this.showMore()) { |
| 179 | Row() { | 183 | Row() { |
| 180 | Ellipse() | 184 | Ellipse() |
| 181 | .width(2* (this.moreWidth - this.initMoreWidth - 1)) | 185 | .width(2* (this.moreWidth - this.initMoreWidth - 1)) |
-
Please register or login to post a comment