vue路由相关

95 阅读1分钟

路由replace

// 避免重复路由报错
const originalReplace = Router.prototype.replace
Router.prototype.replace = function replace(location) {
  return originalReplace.call(this, location).catch(err => err)
}