中国优质的IT技术网站
专业IT技术创作平台
IT职业在线教育平台
如何拦截Navigation路由?
微信扫码分享
this.pathStack.setInterception({ willShow: (from: NavDestinationContext | NavBar, to: NavDestinationContext | NavBar, operation: NavigationOperation, isAnimated: boolean) => { // 页面跳转前拦截,允许操作栈,在当前跳转中生效。 }, didShow: (from: NavDestinationContext | NavBar, to: NavDestinationContext | NavBar, operation: NavigationOperation, isAnimated: boolean) => { //页面跳转后回调。在该回调中操作栈在下一次跳转中刷新, }, modeChange: (mode: NavigationMode) => { //Navigation单双栏显示状态发生变更时触发该回调 } })