Showing
1 changed file
with
14 additions
and
1 deletions
| @@ -400,7 +400,15 @@ export struct TopNavigationComponent { | @@ -400,7 +400,15 @@ export struct TopNavigationComponent { | ||
| 400 | }) | 400 | }) |
| 401 | .id(`col_tabBar${index}`) | 401 | .id(`col_tabBar${index}`) |
| 402 | .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 }) | 402 | .margin({ right: this.myChannelList.length === index + 1 ? 36 : 0 }) |
| 403 | - | 403 | + .onClick(() => { |
| 404 | + Logger.debug(TAG, `onClick, index: ${index}`); | ||
| 405 | + if (this.currentTopNavSelectedIndex === index) { | ||
| 406 | + // 当前tab,单击事件 | ||
| 407 | + this.doAutoRefresh() | ||
| 408 | + } else { | ||
| 409 | + this.tabsController.changeIndex(index) | ||
| 410 | + } | ||
| 411 | + }) | ||
| 404 | } | 412 | } |
| 405 | 413 | ||
| 406 | aboutToAppear() { | 414 | aboutToAppear() { |
| @@ -425,6 +433,11 @@ export struct TopNavigationComponent { | @@ -425,6 +433,11 @@ export struct TopNavigationComponent { | ||
| 425 | this.autoRefresh2Page++ | 433 | this.autoRefresh2Page++ |
| 426 | } | 434 | } |
| 427 | 435 | ||
| 436 | + private doAutoRefresh() { | ||
| 437 | + // 通知page刷新 | ||
| 438 | + this.autoRefresh2Page++ | ||
| 439 | + } | ||
| 440 | + | ||
| 428 | /** | 441 | /** |
| 429 | * 频道id变化,即指定频道跳转场景 | 442 | * 频道id变化,即指定频道跳转场景 |
| 430 | */ | 443 | */ |
-
Please register or login to post a comment