如何清除nativescript-vue手动路由的导航历史记录?

问题描述 投票:0回答:1

我面临的情况是navigation calls只是保持堆叠,如下图所示。

devtools showing navigation calls

这是一个特别的问题,因为当我调用注销功能时它只是堆叠另一个导航条目,因此用户可以使用后退按钮查看以前的屏幕。

有没有办法清理导航条目历史记录?

javascript vue.js nativescript
1个回答
3
投票

clearHistory设为true

// Upon logout, navigate to Login / whichever component you like with `clearHistory` flag
this.$navigateTo(Login, { clearHistory: true });
© www.soinside.com 2019 - 2024. All rights reserved.