Showing
3 changed files
with
16 additions
and
12 deletions
| @@ -63,6 +63,8 @@ export struct EmptyComponent { | @@ -63,6 +63,8 @@ export struct EmptyComponent { | ||
| 63 | @State emptyButton: boolean = false | 63 | @State emptyButton: boolean = false |
| 64 | @State isBlack: boolean = false // 背景是否为黑色 默认白色 | 64 | @State isBlack: boolean = false // 背景是否为黑色 默认白色 |
| 65 | @State timeNum: number = 10 | 65 | @State timeNum: number = 10 |
| 66 | + ///占位图上是否显示返回按钮 | ||
| 67 | + @State showBackButton: boolean = true | ||
| 66 | /** | 68 | /** |
| 67 | * The empty image width percentage setting. | 69 | * The empty image width percentage setting. |
| 68 | */ | 70 | */ |
| @@ -111,16 +113,18 @@ export struct EmptyComponent { | @@ -111,16 +113,18 @@ export struct EmptyComponent { | ||
| 111 | build() { | 113 | build() { |
| 112 | Stack({alignContent:Alignment.Bottom}) { | 114 | Stack({alignContent:Alignment.Bottom}) { |
| 113 | this.noProgrammeData(); | 115 | this.noProgrammeData(); |
| 114 | - Image($r("app.media.icon_arrow_left_white")) | ||
| 115 | - .width(24) | ||
| 116 | - .height(24) | ||
| 117 | - .onClick(() => { | ||
| 118 | - router.back(); | ||
| 119 | - }) | ||
| 120 | - .position({ | ||
| 121 | - bottom: 15, | ||
| 122 | - left: 16 | ||
| 123 | - }) | 116 | + if (this.showBackButton) { |
| 117 | + Image($r("app.media.icon_arrow_left_white")) | ||
| 118 | + .width(24) | ||
| 119 | + .height(24) | ||
| 120 | + .onClick(() => { | ||
| 121 | + router.back(); | ||
| 122 | + }) | ||
| 123 | + .position({ | ||
| 124 | + bottom: 15, | ||
| 125 | + left: 16 | ||
| 126 | + }) | ||
| 127 | + } | ||
| 124 | } | 128 | } |
| 125 | } | 129 | } |
| 126 | 130 |
| @@ -78,7 +78,7 @@ export struct TabChatComponent { | @@ -78,7 +78,7 @@ export struct TabChatComponent { | ||
| 78 | } else if (this.pageModel.viewType == ViewType.ERROR) { | 78 | } else if (this.pageModel.viewType == ViewType.ERROR) { |
| 79 | ErrorComponent() | 79 | ErrorComponent() |
| 80 | } else if (this.pageModel.viewType == ViewType.EMPTY) { | 80 | } else if (this.pageModel.viewType == ViewType.EMPTY) { |
| 81 | - EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1 }) | 81 | + EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoComment1, showBackButton:false}) |
| 82 | } else { | 82 | } else { |
| 83 | 83 | ||
| 84 | CustomPullToRefresh({ | 84 | CustomPullToRefresh({ |
| @@ -75,7 +75,7 @@ export struct TabLiveComponent { | @@ -75,7 +75,7 @@ export struct TabLiveComponent { | ||
| 75 | } else if (this.pageModel.viewType == ViewType.ERROR) { | 75 | } else if (this.pageModel.viewType == ViewType.ERROR) { |
| 76 | ErrorComponent() | 76 | ErrorComponent() |
| 77 | } else if (this.pageModel.viewType == ViewType.EMPTY) { | 77 | } else if (this.pageModel.viewType == ViewType.EMPTY) { |
| 78 | - EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoContent1 }) | 78 | + EmptyComponent({ emptyType: WDViewDefaultType.WDViewDefaultType_NoContent1, showBackButton:false }) |
| 79 | } else { | 79 | } else { |
| 80 | CustomPullToRefresh({ | 80 | CustomPullToRefresh({ |
| 81 | alldata: this.liveList, | 81 | alldata: this.liveList, |
-
Please register or login to post a comment