NativeScript BottomNavigation -> 如何在底部导航项点击时打开默认页面?
NativeScript BottomNavigation -> how to open default page on bottom navigation item tap?
我有一个名为“基金”的页面。我有 5 个选项卡的底部导航 - “主页”/“投资组合”和其他 3 个。在默认行为中,所有选项卡都有自己的导航堆栈,如果在主页中打开“基金”,然后在我 return 到主页“基金”时打开投资组合。
我的目标是在每次触摸时为打开的底部导航选项卡打开默认页面。
已在 this 问题中解决
It's quite possible Frame.topmost() gets confused during tab
transition. However, you can access a certain tab frame and call
goBack() for it. Check this playground and let me know if it solves
your problem:
https://play.nativescript.org/?template=play-tsc&id=4Ij5yz&v=7
我有一个名为“基金”的页面。我有 5 个选项卡的底部导航 - “主页”/“投资组合”和其他 3 个。在默认行为中,所有选项卡都有自己的导航堆栈,如果在主页中打开“基金”,然后在我 return 到主页“基金”时打开投资组合。
我的目标是在每次触摸时为打开的底部导航选项卡打开默认页面。
已在 this 问题中解决
It's quite possible Frame.topmost() gets confused during tab transition. However, you can access a certain tab frame and call goBack() for it. Check this playground and let me know if it solves your problem: https://play.nativescript.org/?template=play-tsc&id=4Ij5yz&v=7