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
wangliang_wd
2024-06-07 10:28:49 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0c4b07613e12dca095386baade052b43f4bba8ee
0c4b0761
1 parent
ba1a8d46
feat:优化个人刷新
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
0c4b076
...
...
@@ -50,6 +50,7 @@ export struct HomePageBottomCommentComponent {
CustomPullToRefresh({
alldata:this.data_comment,
scroller:this.scroller,
hasMore:this.hasMore,
customList:()=>{
this.ListLayout()
},
...
...
@@ -184,7 +185,7 @@ export struct HomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (
this.data_comment.totalCount() < value.totalCount
) {
if (
value.pageNum === 1
) {
this.curPageNum++
} else {
this.hasMore = false
...
...
@@ -217,7 +218,7 @@ export struct HomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (
this.data_comment.totalCount() < value.totalCount
) {
if (
value.pageNum === 1
) {
this.curPageNum++
} else {
this.hasMore = false
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/OtherHomePageBottomCommentComponent.ets
View file @
0c4b076
...
...
@@ -50,6 +50,7 @@ export struct OtherHomePageBottomCommentComponent {
CustomPullToRefresh({
alldata:this.data_comment,
scroller:this.scroller,
hasMore:this.hasMore,
customList:()=>{
this.ListLayout()
},
...
...
@@ -69,6 +70,7 @@ export struct OtherHomePageBottomCommentComponent {
this.isLoading = true
//加载分页数据
this.getNewPageData()
if(resolve) resolve('刷新成功')
}
}
})
...
...
@@ -108,6 +110,13 @@ export struct OtherHomePageBottomCommentComponent {
}
}
}
// .onReachEnd(()=>{
// if (!this.isLoading) {
// this.isLoading = true
// //加载分页数据
// this.getNewPageData()
// }
// })
.cachedCount(5)
.layoutWeight(1)
.scrollBar(BarState.Off)
...
...
@@ -185,7 +194,7 @@ export struct OtherHomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (
this.data_comment.totalCount() < value.totalCount
) {
if (
value.hasNext === 1
) {
this.curPageNum++
} else {
this.hasMore = false
...
...
@@ -214,7 +223,7 @@ export struct OtherHomePageBottomCommentComponent {
this.count = this.data_comment.totalCount()
this.commentNum = value.totalCount
if (
this.data_comment.totalCount() < value.totalCount
) {
if (
value.hasNext === 1
) {
this.curPageNum++
} else {
this.hasMore = false
...
...
Please
register
or
login
to post a comment