Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
liyubing
2024-06-05 14:46:16 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2fa9734997706f26c71484f978a0f30cc56f758a
2fa97349
1 parent
cf49b95e
fix:
1、读报纸,滑到底部,继续上滑,缺少向上并回弹的效果
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
sight_harmony/features/wdComponent/src/main/ets/components/ENewspaperPageComponent.ets
View file @
2fa9734
...
...
@@ -32,7 +32,7 @@ export struct ENewspaperPageComponent {
@State swiperIndex: number = 0;
//当前选择的日期标记
@State selectDate: Date = new Date()
@
Stat
e bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@
Provid
e bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State ratio: string = '100%'
@State toastText: ResourceStr = ""
...
...
@@ -280,17 +280,18 @@ export struct ENewspaperPageComponent {
this.swiperIndex = index
})
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({
top: { anchor: "e_newspaper_content", align: VerticalAlign.Bottom },
// left: { anchor: 'e_newspaper_content', align: HorizontalAlign.Start },
// right: { anchor: 'e_newspaper_content', align: HorizontalAlign.End }
})
.id('e_newspaper_shadow')
Row() {
Image($r('app.media.newspaper_shadow'))
.height($r('app.float.vp_12'))
.width('100%')
.objectFit(ImageFit.Contain)
}.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 }
})
.id('e_newspaper_shadow')
Row() {
Text(this.swiperIndex + 1 == this.newspaperListBean?.list?.length ? '已到底部,可以选择其他日期' :
...
...
@@ -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) {
...
...
sight_harmony/features/wdComponent/src/main/ets/dialog/ENewspaperListDialog.ets
View file @
2fa9734
...
...
@@ -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()
...
...
Please
register
or
login
to post a comment