解决elementUI中使用el-submenu的路由模式会报错的问题

时间:2020-06-16 00:12:49   收藏:0   阅读:518
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

// 下面的代码是vue的路由中的默认代码,把上面的代码复制粘贴到new VueRouter之前就ok

const router = new VueRouter({
  routes
})

 

原文:https://www.cnblogs.com/liuyuexue520/p/13138551.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!