zhangbo1_wd

首页,页面滑动顶导按钮联动,时机修改。减少时延。

@@ -113,9 +113,11 @@ export struct TopNavigationComponentNew { @@ -113,9 +113,11 @@ export struct TopNavigationComponentNew {
113 'middle': { 'anchor': '__container__', 'align': HorizontalAlign.Center }, 113 'middle': { 'anchor': '__container__', 'align': HorizontalAlign.Center },
114 'bottom': { 'anchor': '__container__', 'align': VerticalAlign.Bottom } 114 'bottom': { 'anchor': '__container__', 'align': VerticalAlign.Bottom }
115 }) 115 })
116 - .onChange((index) => {  
117 - Logger.info(TAG, `onChange index : ${index}`);  
118 - 116 + .onAnimationStart((curIndex: number, index: number)=>{
  117 + Logger.info(TAG, `onAnimationStart ${curIndex} ${index}`);
  118 + if (curIndex === index) {
  119 + return
  120 + }
119 if (this.isBroadcastByIndex(index)) { 121 if (this.isBroadcastByIndex(index)) {
120 // 跳转到播报页面 122 // 跳转到播报页面
121 ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId) 123 ProcessUtils.gotoBroadcastPage(this.myChannelList[index].pageId)
@@ -133,7 +135,12 @@ export struct TopNavigationComponentNew { @@ -133,7 +135,12 @@ export struct TopNavigationComponentNew {
133 this.currentTopNavSelectedIndex = index; 135 this.currentTopNavSelectedIndex = index;
134 this.changePage(this.currentTopNavSelectedIndex) 136 this.changePage(this.currentTopNavSelectedIndex)
135 } 137 }
136 - 138 + })
  139 + // .onAnimationEnd((index: number)=>{
  140 + // Logger.info(TAG, `onAnimationEnd ${index}`);
  141 + // })
  142 + .onChange((index) => {
  143 + Logger.info(TAG, `onChange index : ${index}`);
137 }) 144 })
138 } 145 }
139 .width('100%') 146 .width('100%')