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-21 16:57:54 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
42eeee9b2eb2012323bb73e6ac7405b49832a172
42eeee9b
2 parents
d456aea7
4844b250
Merge remote-tracking branch 'origin/main'
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
28 deletions
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
sight_harmony/products/phone/src/main/ets/pages/view/MultiPictureDetailPageComponent.ets
View file @
42eeee9
...
...
@@ -53,6 +53,8 @@ export struct MultiPictureDetailPageComponent {
@Provide showCommentList: boolean = false
private subScroller: Scroller = new Scroller()
private scroller: Scroller = new Scroller()
private listScroller: ListScroller = new ListScroller()
@State contentStartOffset: number = 0;
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
@State isOffLine: boolean = false // 存储视频下线状态用来展示缺省图
@State showDownload: Boolean = false // 控制是否显示下载默认隐藏
...
...
@@ -73,6 +75,8 @@ export struct MultiPictureDetailPageComponent {
let _swiperIndex = Number.parseInt(this.currentPageNum)
Logger.info(TAG, `_swiperIndex:${_swiperIndex}`)
this.swiperIndex = _swiperIndex > 0 ? _swiperIndex - 1 : _swiperIndex
this.scroller.scrollEdge(Edge.Top)
this.listScroller.scrollEdge(Edge.Top)
}
async aboutToAppear() {
...
...
@@ -348,6 +352,8 @@ export struct MultiPictureDetailPageComponent {
.zIndex(1)
.onAnimationStart((index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => {
this.swiperIndex = targetIndex
this.scroller.scrollEdge(Edge.Top)
this.listScroller.scrollEdge(Edge.Top)
})
.onClick(() => {
this.showDownload = !this.showDownload
...
...
@@ -355,13 +361,7 @@ export struct MultiPictureDetailPageComponent {
}
@Builder
NShowDownload() {
Column() {
Scroll(this.scroller) {
Flex({
direction: FlexDirection.Column,
justifyContent: FlexAlign.Start
}) {
ListItemHeader() {
if (this.contentDetailData?.photoList?.length) {
Text() {
Span(`${this.swiperIndex + 1}`)
...
...
@@ -382,9 +382,12 @@ export struct MultiPictureDetailPageComponent {
bottom: 4,
right: 4
})
.width('100%')
}
}
List() {
ListItem(){
@Builder
ListItemTitle() {
if (this.contentDetailData.newsTitle) {
Text(`${this.contentDetailData.newsTitle}`)
.fontColor(Color.White)
...
...
@@ -401,7 +404,9 @@ export struct MultiPictureDetailPageComponent {
.width('92%')
}
}
ListItem(){
@Builder
ListItemDescription() {
if (this.contentDetailData.photoList?.[this.swiperIndex].picDesc) {
Text(`${this.contentDetailData.photoList?.[this.swiperIndex].picDesc}`)
.fontColor(Color.White)
...
...
@@ -420,31 +425,43 @@ export struct MultiPictureDetailPageComponent {
.width('92%')
}
}
@Builder
NShowDownload() {
Column() {
Scroll(this.scroller) {
Column() {
Row()
.width("100%")
.height(this.contentDetailData.photoList?.[this.swiperIndex].picDesc ? 90 : 130)
Flex({
direction: FlexDirection.Column
}) {
this.ListItemHeader();
List({ scroller: this.listScroller }) {
ListItem() {
this.ListItemTitle()
}
ListItem() {
this.ListItemDescription()
}
.nestedScroll(
{
}
.edgeEffect(EdgeEffect.None)
.nestedScroll({
scrollForward: NestedScrollMode.PARENT_FIRST,
scrollBackward: NestedScrollMode.SELF_FIRST
})
}
)
.constraintSize (
{
maxHeight: px2vp(this.titleHeight)
.constraintSize({
minHeight: 1
})
}
)
}
.width('100%')
}
.scrollable(ScrollDirection.Vertical)
.height(230)
.edgeEffect(EdgeEffect.None)
.scrollBarWidth(0)
.constraintSize (
{
maxHeight: px2vp(this.nShowDownloadTitleHeight)
}
)
// .initialOffset({
// yOffset: px2vp(this.titleHeight)/2
// })
.scrollBar(BarState.Off)
OperRowListView({
contentDetailData: this.contentDetailData,
...
...
Please
register
or
login
to post a comment