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-06 10:15:53 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7c3dccf6d0fe80641ecb654bc26b4d3ebff72fdf
7c3dccf6
1 parent
823ef3ed
feat:优化人民号-关注列表显示逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowThirdTabsComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowSecondTabsComponent.ets
View file @
7c3dccf
...
...
@@ -7,11 +7,13 @@ export struct FollowSecondTabsComponent{
@Link data:FollowListItem[]
@State firstIndex:number = 0
@State currentIndex: number = 0
@Prop LeftTab:number = 0 //监听tab变化,重置列表tabIndex = 0
private swiperController: SwiperController = new SwiperController()
fontColor: string = '#000000'
selectedFontColor: string = '#ED2800'
aboutToAppear(){
}
build(){
...
...
@@ -76,7 +78,7 @@ export struct FollowSecondTabsComponent{
Swiper(this.swiperController ) {
ForEach(this.data[this.firstIndex].children, (item: FollowSecondListItem, index: number ) => {
FollowThirdTabsComponent({data:$data,firstIndex:$firstIndex,secondIndex:index})
FollowThirdTabsComponent({data:$data,firstIndex:$firstIndex,secondIndex:index
,LeftTab:this.LeftTab
})
}, (item: FollowListItem, index: number) => index.toString())
}
.loop(false)
...
...
@@ -102,6 +104,7 @@ export struct FollowSecondTabsComponent{
.onClick(()=>{
this.currentIndex = index
this.swiperController.changeIndex(this.currentIndex)
this.LeftTab = Math.random()
})
.justifyContent(FlexAlign.Center)
.height(50)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/mine/follow/FollowThirdTabsComponent.ets
View file @
7c3dccf
...
...
@@ -10,11 +10,21 @@ export struct FollowThirdTabsComponent{
@Link firstIndex: number
@State secondIndex:number = -1
@Watch('LeftTabChange') @Prop LeftTab : number
private swiperController: SwiperController = new SwiperController()
private listScroller: Scroller = new Scroller()
fontColor: string = '#666666'
selectedFontColor: string = '#222222'
///重置界面选择
LeftTabChange(){
if (this.currentIndex != 0) {
this.currentIndex = 0
this.swiperController.changeIndex(this.currentIndex)
this.listScroller.scrollToIndex(this.currentIndex, true, ScrollAlign.CENTER)
}
}
build(){
if(this.data != null){
if(this.data[this.firstIndex].children[this.secondIndex].children == null || this.data[this.firstIndex].children[this.secondIndex].children.length == 0){
...
...
@@ -25,6 +35,7 @@ export struct FollowThirdTabsComponent{
}
}
@Builder TabBuilder(index: number, item: FollowThirdListItem) {
Column(){
Row(){
...
...
@@ -58,8 +69,6 @@ export struct FollowThirdTabsComponent{
.justifyContent(FlexAlign.End)
}
@Builder FollowThirdUI(){
Column(){
...
...
Please
register
or
login
to post a comment