vue-router路由跳转到其他地址,如何不保留历史记录

页面路由配置了两个

{

  path: 'index',

  name: 'introduce',

  component: page.introduce,

},

{

  path: 'detail',

  name: 'detail',

  component: page.detail,

}

由先由index跳转到detail, detail再跳转其他地址如百度或者什么的,再点击微信端的返回,如何直接返回到第一个页面?

HUH函数
浏览 4271回答 1
1回答

慕勒3428872

跳到百度之后就不归你管了.可以在你的路由或者组件里面判断document.referrer是不是为其他网址.是的话返回第一个页面.
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript