Showing
2 changed files
with
8 additions
and
5 deletions
| @@ -46,10 +46,16 @@ export struct ENewspaperItemComponent { | @@ -46,10 +46,16 @@ export struct ENewspaperItemComponent { | ||
| 46 | this.contentHeight = event?.contentHeight | 46 | this.contentHeight = event?.contentHeight |
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | - // this.isShowSkeleton = false | 49 | + this.isShowSkeleton = false |
| 50 | }) | 50 | }) |
| 51 | .objectFit(ImageFit.Contain) | 51 | .objectFit(ImageFit.Contain) |
| 52 | .zIndex(10) | 52 | .zIndex(10) |
| 53 | + | ||
| 54 | + newsSkeleton({showBottom: this.isShowSkeleton}) | ||
| 55 | + .visibility(this.isShowSkeleton ? Visibility.Visible : Visibility.None) | ||
| 56 | + .width('100%') | ||
| 57 | + .zIndex(1) | ||
| 58 | + | ||
| 53 | 59 | ||
| 54 | if (this.contentWidth !== 0) { | 60 | if (this.contentWidth !== 0) { |
| 55 | Canvas(this.context) | 61 | Canvas(this.context) |
| @@ -25,7 +25,6 @@ export struct ENewspaperPageComponent { | @@ -25,7 +25,6 @@ export struct ENewspaperPageComponent { | ||
| 25 | @State picHeight: number = 0 | 25 | @State picHeight: number = 0 |
| 26 | @Provide itemPicWidth: number = 0 | 26 | @Provide itemPicWidth: number = 0 |
| 27 | @Provide itemPicHeight: number = 0 | 27 | @Provide itemPicHeight: number = 0 |
| 28 | - @State isShowSkeleton:boolean = false | ||
| 29 | 28 | ||
| 30 | @Provide topMargin: number = DisplayUtils.getDeviceHeight() | 29 | @Provide topMargin: number = DisplayUtils.getDeviceHeight() |
| 31 | 30 | ||
| @@ -84,7 +83,6 @@ export struct ENewspaperPageComponent { | @@ -84,7 +83,6 @@ export struct ENewspaperPageComponent { | ||
| 84 | builder: ENewspaperCalendarDialog({ | 83 | builder: ENewspaperCalendarDialog({ |
| 85 | selectDate: this.selectDate, | 84 | selectDate: this.selectDate, |
| 86 | onDateChange: (date: RMCalendarBean) => { | 85 | onDateChange: (date: RMCalendarBean) => { |
| 87 | - this.isShowSkeleton = true | ||
| 88 | console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date)) | 86 | console.log("onDateChange-日历选择弹框", "date:", JSON.stringify(date)) |
| 89 | if (date.fullYear && date.month && date.date) { | 87 | if (date.fullYear && date.month && date.date) { |
| 90 | let month: number = date.month + 1 | 88 | let month: number = date.month + 1 |
| @@ -256,7 +254,7 @@ export struct ENewspaperPageComponent { | @@ -256,7 +254,7 @@ export struct ENewspaperPageComponent { | ||
| 256 | }) | 254 | }) |
| 257 | .id('e_newspaper_top') | 255 | .id('e_newspaper_top') |
| 258 | 256 | ||
| 259 | - if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0 || this.isShowSkeleton) { | 257 | + if (!this.newspaperListBean || !this.newspaperListBean.list || this.newspaperListBean.list.length == 0) { |
| 260 | newsSkeleton() | 258 | newsSkeleton() |
| 261 | .alignRules({ | 259 | .alignRules({ |
| 262 | top: { anchor: "e_newspaper_top", align: VerticalAlign.Bottom }, | 260 | top: { anchor: "e_newspaper_top", align: VerticalAlign.Bottom }, |
| @@ -478,7 +476,6 @@ export struct ENewspaperPageComponent { | @@ -478,7 +476,6 @@ export struct ENewspaperPageComponent { | ||
| 478 | let listBean = | 476 | let listBean = |
| 479 | await NewspaperViewModel.getNewspaperList(this.calendarDate, this.itemPicWidth + 'x' + this.itemPicHeight) | 477 | await NewspaperViewModel.getNewspaperList(this.calendarDate, this.itemPicWidth + 'x' + this.itemPicHeight) |
| 480 | this.newspaperListBean = listBean; | 478 | this.newspaperListBean = listBean; |
| 481 | - this.isShowSkeleton = false | ||
| 482 | } else { | 479 | } else { |
| 483 | this.showToastTip('网络出小差了,请检查网络后重试') | 480 | this.showToastTip('网络出小差了,请检查网络后重试') |
| 484 | } | 481 | } |
-
Please register or login to post a comment