zhangbo1_wd

添加顶导单击刷新

... ... @@ -400,7 +400,15 @@ export struct TopNavigationComponent {
})
.id(`col_tabBar${index}`)
.margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 })
.onClick(() => {
Logger.debug(TAG, `onClick, index: ${index}`);
if (this.currentTopNavSelectedIndex === index) {
// 当前tab,单击事件
this.doAutoRefresh()
} else {
this.tabsController.changeIndex(index)
}
})
}
aboutToAppear() {
... ... @@ -425,6 +433,11 @@ export struct TopNavigationComponent {
this.autoRefresh2Page++
}
private doAutoRefresh() {
// 通知page刷新
this.autoRefresh2Page++
}
/**
* 频道id变化,即指定频道跳转场景
*/
... ...