Showing
2 changed files
with
13 additions
and
6 deletions
| @@ -26,6 +26,7 @@ import { common } from '@kit.AbilityKit'; | @@ -26,6 +26,7 @@ import { common } from '@kit.AbilityKit'; | ||
| 26 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' | 26 | import TrackingPageBrowseUtils from '../../utils/TrackingPageBrowseUtils' |
| 27 | import {TrackConstants,TrackParamConvert}from 'wdTracking/Index' | 27 | import {TrackConstants,TrackParamConvert}from 'wdTracking/Index' |
| 28 | import { ColorUtils } from '../../utils/ColorUtils'; | 28 | import { ColorUtils } from '../../utils/ColorUtils'; |
| 29 | +import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent'; | ||
| 29 | 30 | ||
| 30 | const TAG = 'MorningEveningPaperComponent'; | 31 | const TAG = 'MorningEveningPaperComponent'; |
| 31 | 32 | ||
| @@ -37,6 +38,7 @@ export struct MorningEveningPaperComponent { | @@ -37,6 +38,7 @@ export struct MorningEveningPaperComponent { | ||
| 37 | @State compListItem: CompList = {} as CompList | 38 | @State compListItem: CompList = {} as CompList |
| 38 | @Provide commentList: InteractDataDTO[] = [] | 39 | @Provide commentList: InteractDataDTO[] = [] |
| 39 | @State audioPlayUrl: string = "" | 40 | @State audioPlayUrl: string = "" |
| 41 | + @State isNoListContent:boolean = false; | ||
| 40 | // @Consume dailyPaperTopicPageId: number | 42 | // @Consume dailyPaperTopicPageId: number |
| 41 | // @Provide compListItem: CompList = {} as CompList | 43 | // @Provide compListItem: CompList = {} as CompList |
| 42 | // @State morningEveningPaperDTO: MorningEveningPaperDTO = { | 44 | // @State morningEveningPaperDTO: MorningEveningPaperDTO = { |
| @@ -172,6 +174,7 @@ export struct MorningEveningPaperComponent { | @@ -172,6 +174,7 @@ export struct MorningEveningPaperComponent { | ||
| 172 | this.totalTime = DateFormatUtil.secondToTime(duration); | 174 | this.totalTime = DateFormatUtil.secondToTime(duration); |
| 173 | this.progressVal = Math.floor(position * 100 / duration); | 175 | this.progressVal = Math.floor(position * 100 / duration); |
| 174 | } | 176 | } |
| 177 | + this.isNoListContent = this.compListItem && this.compListItem?.operDataList?.length > 0 ?false:true | ||
| 175 | } catch (exception) { | 178 | } catch (exception) { |
| 176 | 179 | ||
| 177 | } | 180 | } |
| @@ -264,12 +267,16 @@ export struct MorningEveningPaperComponent { | @@ -264,12 +267,16 @@ export struct MorningEveningPaperComponent { | ||
| 264 | } | 267 | } |
| 265 | 268 | ||
| 266 | ListItem() { | 269 | ListItem() { |
| 267 | - SingleColumn999Component({ | ||
| 268 | - compListItem: this.compListItem, | ||
| 269 | - }) | ||
| 270 | - .margin({ | ||
| 271 | - top: this.isHasTopView ? 10 : 44+this.topSafeHeight | 270 | + if(this.isNoListContent){ |
| 271 | + EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) | ||
| 272 | + }else { | ||
| 273 | + SingleColumn999Component({ | ||
| 274 | + compListItem: this.compListItem, | ||
| 272 | }) | 275 | }) |
| 276 | + .margin({ | ||
| 277 | + top: this.isHasTopView ? 10 : 44+this.topSafeHeight | ||
| 278 | + }) | ||
| 279 | + } | ||
| 273 | } | 280 | } |
| 274 | } | 281 | } |
| 275 | // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) | 282 | // .height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`) |
| @@ -152,7 +152,7 @@ export struct SingleColumn999Component { | @@ -152,7 +152,7 @@ export struct SingleColumn999Component { | ||
| 152 | scrollBackward: NestedScrollMode.SELF_FIRST | 152 | scrollBackward: NestedScrollMode.SELF_FIRST |
| 153 | }) | 153 | }) |
| 154 | } else { | 154 | } else { |
| 155 | - EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) | 155 | + // EmptyComponent({emptyType:WDViewDefaultType.WDViewDefaultType_NoListContent}) |
| 156 | } | 156 | } |
| 157 | } | 157 | } |
| 158 | 158 |
-
Please register or login to post a comment