zhangbo1_wd

图集页面,去除全屏设置

@@ -49,6 +49,7 @@ export struct MultiPictureListPage { @@ -49,6 +49,7 @@ export struct MultiPictureListPage {
49 left: { anchor: "__container__", align: HorizontalAlign.Start } 49 left: { anchor: "__container__", align: HorizontalAlign.Start }
50 }) 50 })
51 .onClick(() => { 51 .onClick(() => {
  52 + this.onBack();
52 router.back(); 53 router.back();
53 }) 54 })
54 .id("backImg") 55 .id("backImg")
@@ -134,7 +135,7 @@ export struct MultiPictureListPage { @@ -134,7 +135,7 @@ export struct MultiPictureListPage {
134 } 135 }
135 .width('100%') 136 .width('100%')
136 .height('100%') 137 .height('100%')
137 - .padding({top:$r('app.float.margin_44')}) 138 + // .padding({top:$r('app.float.margin_44')})
138 .backgroundColor(Color.Black) 139 .backgroundColor(Color.Black)
139 .id('e_picture_container') 140 .id('e_picture_container')
140 // 设置顶部绘制延伸到状态栏 141 // 设置顶部绘制延伸到状态栏
@@ -148,7 +149,7 @@ export struct MultiPictureListPage { @@ -148,7 +149,7 @@ export struct MultiPictureListPage {
148 */ 149 */
149 openFullScreen() { 150 openFullScreen() {
150 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 151 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
151 - WindowModel.shared.setWindowLayoutFullScreen(true) 152 + // WindowModel.shared.setWindowLayoutFullScreen(true)
152 // WindowModel.shared.setWindowSystemBarEnable([]) 153 // WindowModel.shared.setWindowSystemBarEnable([])
153 } 154 }
154 155
@@ -163,7 +164,16 @@ export struct MultiPictureListPage { @@ -163,7 +164,16 @@ export struct MultiPictureListPage {
163 */ 164 */
164 closeFullScreen() { 165 closeFullScreen() {
165 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 166 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
166 - WindowModel.shared.setWindowLayoutFullScreen(false) 167 + // WindowModel.shared.setWindowLayoutFullScreen(false)
167 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) 168 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])
168 } 169 }
  170 +
  171 + onBackPress(): boolean | void {
  172 + this.onBack()
  173 + }
  174 +
  175 + private onBack() {
  176 + // 提前设置,否则返回的页面展示有问题(有时延)
  177 + this.closeFullScreen()
  178 + }
169 } 179 }
@@ -91,7 +91,7 @@ struct MultiPictureDetailPage { @@ -91,7 +91,7 @@ struct MultiPictureDetailPage {
91 */ 91 */
92 openFullScreen() { 92 openFullScreen() {
93 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', }) 93 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#ffffff', })
94 - WindowModel.shared.setWindowLayoutFullScreen(true) 94 + // WindowModel.shared.setWindowLayoutFullScreen(true)
95 // WindowModel.shared.setWindowSystemBarEnable([]) 95 // WindowModel.shared.setWindowSystemBarEnable([])
96 } 96 }
97 97
@@ -101,7 +101,7 @@ struct MultiPictureDetailPage { @@ -101,7 +101,7 @@ struct MultiPictureDetailPage {
101 */ 101 */
102 closeFullScreen() { 102 closeFullScreen() {
103 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', }) 103 WindowModel.shared.setWindowSystemBarProperties({ statusBarContentColor: '#000000', })
104 - WindowModel.shared.setWindowLayoutFullScreen(false) 104 + // WindowModel.shared.setWindowLayoutFullScreen(false)
105 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation']) 105 // WindowModel.shared.setWindowSystemBarEnable(['status', 'navigation'])
106 } 106 }
107 107