直接上代码 写在 router js文件
import Vue
from 'vue'
import VueRouter
from 'vue-router'
import home
from '../views/Home.vue'
Vue
.use(VueRouter
)
const originalPush
= VueRouter
.prototype
.push
VueRouter
.prototype
.push = function push(location
) {
return originalPush
.call(this, location
).catch(err
=> err
)
}
转载请注明原文地址:https://ipadbbs.8miu.com/read-12704.html