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
zhangbo1_wd
2024-04-28 16:38:33 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
85992491e4cff7f6d0455ace508452b098da6dbe
85992491
1 parent
1d181f48
首页分页加载改为预加载,去除分页动画
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
10 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
sight_harmony/features/wdComponent/src/main/ets/utils/PullDownRefresh.ets
sight_harmony/features/wdComponent/src/main/ets/utils/PullUpLoadMore.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/PageComponent.ets
View file @
8599249
...
...
@@ -84,10 +84,10 @@ export struct PageComponent {
// 加载更多
ListItem() {
if (this.pageModel.hasMore) {
LoadMoreLayout({
refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage,
this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight)
})
// LoadMoreLayout({
// refreshBean: new RefreshLayoutBean(this.pageModel.isVisiblePullUpLoad, this.pageModel.pullUpLoadImage,
// this.pageModel.pullUpLoadText, this.pageModel.pullUpLoadHeight)
// })
} else if (!this.pageModel.contentNeedScroll) {
PageNoMoreLayout({ noMoreBean: new NoMoreBean(this.pageModel.pageInfo.baselineCopywriting) })
}
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/PullDownRefresh.ets
View file @
8599249
...
...
@@ -35,7 +35,7 @@ export function listTouchEvent(pageModel: PageModel, pageAdvModel: PageAdModel,
touchUpPullRefresh(pageModel, pageAdvModel);
} else {
// Fingers up, handle loading more.
touchUpLoadMore(pageModel);
//
touchUpLoadMore(pageModel);
}
break;
default:
...
...
sight_harmony/features/wdComponent/src/main/ets/utils/PullUpLoadMore.ets
View file @
8599249
...
...
@@ -4,13 +4,18 @@ import PageHelper from '../viewmodel/PageHelper';
export function touchMoveLoadMore(model: PageModel, event: TouchEvent) {
// list size +1
if (model.endIndex === model.compList.totalCount() || model.endIndex === model.compList.totalCount() + 1) {
model.offsetY = event.touches[0].y - model.downY;
if (Math.abs(model.offsetY) > vp2px(model.pullUpLoadHeight) / 2) {
if (model.endIndex >= model.compList.totalCount()-3 && model.endIndex <= model.compList.totalCount()) {
// model.offsetY = event.touches[0].y - model.downY;
// if (Math.abs(model.offsetY) > vp2px(model.pullUpLoadHeight) / 2) {
// model.isCanLoadMore = true;
// model.isVisiblePullUpLoad = true;
// model.offsetY = -vp2px(model.pullUpLoadHeight) + model.offsetY * Const.Y_OFF_SET_COEFFICIENT;
// }
// 不用分页动画,直接预加载
model.isCanLoadMore = true;
model.isVisiblePullUpLoad = true;
model.offsetY = -vp2px(model.pullUpLoadHeight) + model.offsetY * Const.Y_OFF_SET_COEFFICIENT;
}
touchUpLoadMore(model);
}
}
...
...
Please
register
or
login
to post a comment