wangliang_wd

feat:调整人民号列表滑动

@@ -52,13 +52,33 @@ export struct PeopleShipHomeListComponent { @@ -52,13 +52,33 @@ export struct PeopleShipHomeListComponent {
52 52
53 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { 53 Tabs({ barPosition: BarPosition.Start, controller: this.controller }) {
54 ForEach(this.tabArr, (item: ArticleTypeData, index: number) => { 54 ForEach(this.tabArr, (item: ArticleTypeData, index: number) => {
55 - TabContent() {  
56 - PeopleShipHomeArticleListComponent({  
57 - typeModel: item,  
58 - creatorId: this.creatorId,  
59 - currentTopSelectedIndex: this.currentIndex,  
60 - currentIndex: index  
61 - }) 55 + if (index == 0){
  56 + TabContent() {
  57 + PeopleShipHomeArticleListComponent({
  58 + typeModel: item,
  59 + creatorId: this.creatorId,
  60 + currentTopSelectedIndex: this.currentIndex,
  61 + currentIndex: index
  62 + })
  63 + }.gesture(PanGesture(new PanGestureOptions({ direction: PanDirection.Right})))
  64 + }else if(index == this.tabArr.length - 1){
  65 + TabContent() {
  66 + PeopleShipHomeArticleListComponent({
  67 + typeModel: item,
  68 + creatorId: this.creatorId,
  69 + currentTopSelectedIndex: this.currentIndex,
  70 + currentIndex: index
  71 + })
  72 + }.gesture(PanGesture(new PanGestureOptions({ direction: PanDirection.Left})))
  73 + }else{
  74 + TabContent() {
  75 + PeopleShipHomeArticleListComponent({
  76 + typeModel: item,
  77 + creatorId: this.creatorId,
  78 + currentTopSelectedIndex: this.currentIndex,
  79 + currentIndex: index
  80 + })
  81 + }
62 } 82 }
63 // .tabBar(this.Tab(index, item.name ?? '')) 83 // .tabBar(this.Tab(index, item.name ?? ''))
64 }) 84 })