liyubing

fix:

1、读报纸,滑到底部,继续上滑,缺少向上并回弹的效果
... ... @@ -32,7 +32,7 @@ export struct ENewspaperPageComponent {
@State swiperIndex: number = 0;
//当前选择的日期标记
@State selectDate: Date = new Date()
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@Provide bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State ratio: string = '100%'
@State toastText: ResourceStr = ""
... ... @@ -280,12 +280,13 @@ export struct ENewspaperPageComponent {
this.swiperIndex = index
})
Row() {
Image($r('app.media.newspaper_shadow'))
.height($r('app.float.vp_12'))
.width('100%')
.margin({ left: 10, right: 10, top: -1 })
.objectFit(ImageFit.Contain)
.alignRules({
}.margin({ top: -1,left: 10, right: 10 }).alignRules({
top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom },
// left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start },
// right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End }
... ... @@ -407,7 +408,7 @@ export struct ENewspaperPageComponent {
.width('100%')
.height('100%')
.backgroundColor($r('app.color.color_80000000'))
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
// .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.id('e_newspaper_container')
if (this.isOpenListDialog) {
... ...
... ... @@ -18,6 +18,7 @@ export struct ENewspaperListDialog {
private listScroller: Scroller = new Scroller()
@State scrollOffset: number = 0
@State isCurrentViewOpen: boolean = false
@Consume bottomSafeHeight:number
//文字版选择弹框
pageListDialogController: CustomDialogController = new CustomDialogController({
builder: ENewspaperPageDialog({
... ... @@ -266,13 +267,13 @@ export struct ENewspaperListDialog {
left: 15,
right: 15,
// top: 16,
bottom: 16
// bottom: 16
})
.margin({
bottom: 85
})
.scrollBar(BarState.Off)
.edgeEffect(EdgeEffect.None)
.edgeEffect(EdgeEffect.Spring)
.onScrollIndex((firstIndex: number, lastIndex: number, centerIndex: number) => {
console.info('ENewspaperListDialog::first' + firstIndex)
console.info('ENewspaperListDialog::last' + lastIndex)
... ... @@ -288,19 +289,14 @@ export struct ENewspaperListDialog {
// }
})
}
// .margin({ top: 124 })
.margin({ top: this.topHeight })
.width('100%')
.backgroundColor(Color.White)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
.onClick(() => {
})
}.width('100%')
.height('100%')
.backgroundColor('#80000000')
.margin({bottom:44})
.margin({bottom:50})
.onClick(() => {
if (this.closeDialog) {
this.closeDialog()
... ...