Showing
2 changed files
with
6 additions
and
4 deletions
| @@ -49,7 +49,7 @@ export struct ENewspaperItemComponent { | @@ -49,7 +49,7 @@ export struct ENewspaperItemComponent { | ||
| 49 | }) | 49 | }) |
| 50 | .objectFit(ImageFit.Fill) | 50 | .objectFit(ImageFit.Fill) |
| 51 | .zIndex(10) | 51 | .zIndex(10) |
| 52 | - newsSkeleton() | 52 | + newsSkeleton({showBottom: false}) |
| 53 | .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | 53 | .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) |
| 54 | .width('100%') | 54 | .width('100%') |
| 55 | .zIndex(1) | 55 | .zIndex(1) |
| @@ -6,6 +6,7 @@ | @@ -6,6 +6,7 @@ | ||
| 6 | @Component | 6 | @Component |
| 7 | export struct newsSkeleton { | 7 | export struct newsSkeleton { |
| 8 | @State quantity: Array<number> = [1, 2, 3,] | 8 | @State quantity: Array<number> = [1, 2, 3,] |
| 9 | + @State showBottom: boolean = true | ||
| 9 | 10 | ||
| 10 | build() { | 11 | build() { |
| 11 | Row() { | 12 | Row() { |
| @@ -116,9 +117,10 @@ export struct newsSkeleton { | @@ -116,9 +117,10 @@ export struct newsSkeleton { | ||
| 116 | right: 15, | 117 | right: 15, |
| 117 | left: 15 | 118 | left: 15 |
| 118 | }) | 119 | }) |
| 119 | - | ||
| 120 | - Column().backgroundColor('#CBCBCB').height(5).width(339) | ||
| 121 | - Column().backgroundColor('#909090').height(5).width(326) | 120 | + if (this.showBottom) { |
| 121 | + Column().backgroundColor('#CBCBCB').height(5).width(339) | ||
| 122 | + Column().backgroundColor('#909090').height(5).width(326) | ||
| 123 | + } | ||
| 122 | } | 124 | } |
| 123 | .width('100%') | 125 | .width('100%') |
| 124 | } | 126 | } |
-
Please register or login to post a comment