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-09-05 11:02:13 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8cb69168aea3b238f04f8f6807c505439847b5f1
8cb69168
1 parent
2aec8e7b
feat:优化用户主页
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/reusable/ListHasNoMoreDataUI.ets
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/home/HomePageBottomCommentComponent.ets
View file @
8cb6916
import { DateTimeUtils, LazyDataSource, UserDataLocal } from 'wdKit';
import { DateTimeUtils,
DisplayUtils,
LazyDataSource, UserDataLocal } from 'wdKit';
import MinePageDatasModel from '../../../model/MinePageDatasModel';
import { CommentListItem } from '../../../viewmodel/CommentListItem';
import { FollowListDetailRequestItem } from '../../../viewmodel/FollowListDetailRequestItem';
...
...
@@ -27,7 +27,7 @@ export struct HomePageBottomCommentComponent {
@Link commentNum: number
@State isGetRequest: boolean = false
private scroller: Scroller = new Scroller();
@State bottomCompH:number = 200
aboutToAppear() {
this.getNewPageData()
}
...
...
@@ -107,7 +107,7 @@ export struct HomePageBottomCommentComponent {
//没有更多数据 显示提示
if (!this.hasMore) {
ListItem() {
ListHasNoMoreDataUI()
ListHasNoMoreDataUI()
.height(this.bottomCompH > 100 ? this.bottomCompH :100)
}
}
}
...
...
@@ -172,6 +172,7 @@ export struct HomePageBottomCommentComponent {
parentCommentUserName))
})
this.bottomCompH = DisplayUtils.getDeviceHeight() - data.length*180
if (status.commentIdList.length === 0) {
if (this.curPageNum === 1) this.data_comment.clear()
...
...
sight_harmony/features/wdComponent/src/main/ets/components/reusable/ListHasNoMoreDataUI.ets
View file @
8cb6916
...
...
@@ -12,7 +12,7 @@ export struct ListHasNoMoreDataUI{
.lineHeight(20)
}.justifyContent(FlexAlign.Center)
.width('100%')
.margin({top:
24,bottom: 24
})
.margin({top:
15
})
}else if (this.style === 2){
Column(){
Image($r('app.media.empty_icon'))
...
...
sight_harmony/features/wdComponent/src/main/ets/pages/MineHomePage.ets
View file @
8cb6916
...
...
@@ -209,6 +209,7 @@ struct MineHomePage {
.padding({ left: 16 })
Column(){
//用户简介区域
Column() {
Row() {
...
...
@@ -246,17 +247,18 @@ struct MineHomePage {
.fontColor($r('app.color.color_999999'))
.textAlign(TextAlign.Start)
.margin({ top: 10 })
}
.padding({ left: 16,right: 16,top: 12,bottom: 12})
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
.width('100%')
.backgroundColor($r('app.color.white'))
//间隔符
//间隔符
Divider().width('100%').height(6).color($r('app.color.color_F5F5F5')).strokeWidth(6)
}.width('100%')
.backgroundColor($r('app.color.white'))
.alignItems(HorizontalAlign.Start)
.justifyContent(FlexAlign.Center)
//tab 页面
Stack({ alignContent: Alignment.Top }){
Tabs({controller: this.controller}) {
...
...
@@ -446,6 +448,7 @@ struct MineHomePage {
.fontWeight(this.currentIndex === index ? 600 : 400)
.fontColor(this.currentIndex === index ? this.selectedFontColor : this.fontColor)
.lineHeight(20)
.height(40)
if(this.currentIndex === index){
Divider()
...
...
@@ -453,7 +456,7 @@ struct MineHomePage {
.height(2)
.color('#ED2800')
.strokeWidth(2)
.margin({top:
35
})
.margin({top:
40
})
.id("divTag")
}
}.onClick(()=>{
...
...
@@ -461,7 +464,7 @@ struct MineHomePage {
this.controller.changeIndex(this.currentIndex)
trackTabFirstClick(index === 0 ? "评论":"关注")
})
.height(
35
)
.height(
42
)
.width(36)
.margin({right: 30})
}
...
...
Please
register
or
login
to post a comment