vue重复访问同一路由报错
生活随笔
收集整理的這篇文章主要介紹了
vue重复访问同一路由报错
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
vue重復訪問同一路由報錯
import Vue from 'vue' import Router from 'vue-router' Vue.use(Router) // 重寫router的push方法,防止訪問同一路由報錯 const VueRouterPush = Router.prototype.push Router.prototype.push = function push (to) {return VueRouterPush.call(this, to).catch(err => err) }總結
以上是生活随笔為你收集整理的vue重复访问同一路由报错的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: uni-app的常用功能查询,uni-a
- 下一篇: vue 路由重复跳转报错问题