liyubing

fix:

1、读报纸,滑到底部,继续上滑,缺少向上并回弹的效果
@@ -32,7 +32,7 @@ export struct ENewspaperPageComponent { @@ -32,7 +32,7 @@ export struct ENewspaperPageComponent {
32 @State swiperIndex: number = 0; 32 @State swiperIndex: number = 0;
33 //当前选择的日期标记 33 //当前选择的日期标记
34 @State selectDate: Date = new Date() 34 @State selectDate: Date = new Date()
35 - @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 35 + @Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
36 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0 36 @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
37 @State ratio: string = '100%' 37 @State ratio: string = '100%'
38 @State toastText: ResourceStr = "" 38 @State toastText: ResourceStr = ""
@@ -280,17 +280,18 @@ export struct ENewspaperPageComponent { @@ -280,17 +280,18 @@ export struct ENewspaperPageComponent {
280 this.swiperIndex = index 280 this.swiperIndex = index
281 }) 281 })
282 282
283 - Image($r('app.media.newspaper_shadow'))  
284 - .height($r('app.float.vp_12'))  
285 - .width('100%')  
286 - .margin({ left: 10, right: 10, top: -1 })  
287 - .objectFit(ImageFit.Contain)  
288 - .alignRules({  
289 - top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom },  
290 - // left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start },  
291 - // right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End }  
292 - })  
293 - .id('e_newspaper_shadow') 283 + Row() {
  284 + Image($r('app.media.newspaper_shadow'))
  285 + .height($r('app.float.vp_12'))
  286 + .width('100%')
  287 + .objectFit(ImageFit.Contain)
  288 +
  289 + }.margin({ top: -1,left: 10, right: 10 }).alignRules({
  290 + top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom },
  291 + // left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start },
  292 + // right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End }
  293 + })
  294 + .id('e_newspaper_shadow')
294 295
295 Row() { 296 Row() {
296 Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' : 297 Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' :
@@ -407,7 +408,7 @@ export struct ENewspaperPageComponent { @@ -407,7 +408,7 @@ export struct ENewspaperPageComponent {
407 .width('100%') 408 .width('100%')
408 .height('100%') 409 .height('100%')
409 .backgroundColor($r('app.color.color_80000000')) 410 .backgroundColor($r('app.color.color_80000000'))
410 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM]) 411 + // .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
411 .id('e_newspaper_container') 412 .id('e_newspaper_container')
412 413
413 if (this.isOpenListDialog) { 414 if (this.isOpenListDialog) {
@@ -18,6 +18,7 @@ export struct ENewspaperListDialog { @@ -18,6 +18,7 @@ export struct ENewspaperListDialog {
18 private listScroller: Scroller = new Scroller() 18 private listScroller: Scroller = new Scroller()
19 @State scrollOffset: number = 0 19 @State scrollOffset: number = 0
20 @State isCurrentViewOpen: boolean = false 20 @State isCurrentViewOpen: boolean = false
  21 + @Consume bottomSafeHeight:number
21 //文字版选择弹框 22 //文字版选择弹框
22 pageListDialogController: CustomDialogController = new CustomDialogController({ 23 pageListDialogController: CustomDialogController = new CustomDialogController({
23 builder: ENewspaperPageDialog({ 24 builder: ENewspaperPageDialog({
@@ -266,13 +267,13 @@ export struct ENewspaperListDialog { @@ -266,13 +267,13 @@ export struct ENewspaperListDialog {
266 left: 15, 267 left: 15,
267 right: 15, 268 right: 15,
268 // top: 16, 269 // top: 16,
269 - bottom: 16 270 + // bottom: 16
270 }) 271 })
271 .margin({ 272 .margin({
272 bottom: 85 273 bottom: 85
273 }) 274 })
274 .scrollBar(BarState.Off) 275 .scrollBar(BarState.Off)
275 - .edgeEffect(EdgeEffect.None) 276 + .edgeEffect(EdgeEffect.Spring)
276 .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => { 277 .onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => {
277 console.info('ENewspaperListDialog::first' + firstIndex) 278 console.info('ENewspaperListDialog::first' + firstIndex)
278 console.info('ENewspaperListDialog::last' + lastIndex) 279 console.info('ENewspaperListDialog::last' + lastIndex)
@@ -288,19 +289,14 @@ export struct ENewspaperListDialog { @@ -288,19 +289,14 @@ export struct ENewspaperListDialog {
288 // } 289 // }
289 }) 290 })
290 } 291 }
291 - // .margin({ top: 124 })  
292 .margin({ top: this.topHeight }) 292 .margin({ top: this.topHeight })
293 -  
294 .width('100%') 293 .width('100%')
295 .backgroundColor(Color.White) 294 .backgroundColor(Color.White)
296 - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])  
297 - .onClick(() => {  
298 295
299 - })  
300 }.width('100%') 296 }.width('100%')
301 .height('100%') 297 .height('100%')
302 .backgroundColor('#80000000') 298 .backgroundColor('#80000000')
303 - .margin({bottom:44}) 299 + .margin({bottom:50})
304 .onClick(() => { 300 .onClick(() => {
305 if (this.closeDialog) { 301 if (this.closeDialog) {
306 this.closeDialog() 302 this.closeDialog()