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
xugenyuan
2024-06-05 14:53:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
533b20980e8fbd2b2d03978931ec5e614db45b60
533b2098
1 parent
fbb14be3
ref |> 图文详情页 适配全屏
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/ImageAndTextPageComponent.ets
View file @
533b209
...
...
@@ -61,6 +61,7 @@ export struct ImageAndTextPageComponent {
@State likeNum: number = 0
@State reachEndIncreament: number = 0
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') || 0
@State isScrollTop: boolean = true
@State offsetY: number = 0
pageShowTime:number = 0;
...
...
@@ -88,7 +89,7 @@ export struct ImageAndTextPageComponent {
action: this.action,
isPageEnd: $isPageEnd
})
.padding({
top: 15,
bottom: 10 })
.padding({ bottom: 10 })
Column() {
// 点赞
if (this.contentDetailData?.openLikes && this.contentDetailData?.likesStyle !== 4) {
...
...
@@ -159,8 +160,8 @@ export struct ImageAndTextPageComponent {
}
.id('imgTextContainer')
}
.padding({bottom: 44})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.scrollBar(BarState.Off)
.align(Alignment.Top)
.onReachEnd(() => {
...
...
@@ -174,10 +175,10 @@ export struct ImageAndTextPageComponent {
retry: () => {
this.getDetail()
}
}).padding({ bottom:
200
})
}).padding({ bottom:
44
})
} else {
if (!this.isPageEnd) {
detailedSkeleton().padding({ bottom:
this.bottomSafeHeight
})
detailedSkeleton().padding({ bottom:
44
})
}
}
// 底部交互区
...
...
@@ -206,12 +207,10 @@ export struct ImageAndTextPageComponent {
this.isScrollTop = !this.isScrollTop
}
})
.position({ y: '100%' })
}
.margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
.padding({ top: 38 })
// .height(CommonConstants.FULL_HEIGHT)
// 发布时间
Column() {
...
...
@@ -242,6 +241,7 @@ export struct ImageAndTextPageComponent {
.backgroundColor(Color.White)
}.backgroundColor(Color.White)
}
.margin({top: `${this.topSafeHeight}px`, bottom: `${this.bottomSafeHeight}px`})
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.backgroundColor(Color.White)
...
...
Please
register
or
login
to post a comment