mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-04-06 03:58:00 +08:00
fix resetRouter
This commit is contained in:
parent
2f8ff389d2
commit
9e4b4cfb87
@ -1,8 +1,5 @@
|
||||
<div align="center"><img width="200" src="https://gitee.com/chu1204505056/image/raw/master/logo/vab.svg"/>
|
||||
<h1> vue-admin-beautiful-pro(element-ui) </h1>
|
||||
<p>程序无国界,但程序员有国界,中国国家尊严不容挑衅,如果您在特殊时期继续购买HM、耐克、阿迪达斯等品牌那么您将无权继续使用Vab</p>
|
||||
<p>Programs have no borders, but programmers have borders. China's national dignity can not be challenged. If you continue to buy HM, Nike, Adidas and other brands in a special period, you will not have the right to continue to use Vab
|
||||
</p>
|
||||
</div>
|
||||
|
||||
[](https://vue-admin-beautiful.com)
|
||||
|
@ -41,7 +41,7 @@
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"clipboard": "^2.0.8",
|
||||
"core-js": "^3.15.1",
|
||||
"core-js": "^3.15.2",
|
||||
"dayjs": "^1.10.5",
|
||||
"echarts": "^5.1.2",
|
||||
"element-ui": "^2.15.3",
|
||||
|
@ -371,23 +371,9 @@ const router = new VueRouter({
|
||||
}),
|
||||
routes: constantRoutes,
|
||||
})
|
||||
//注释的地方是允许路由重复点击,如果你觉得框架路由跳转规范太过严格可选择放开
|
||||
const originalPush = VueRouter.prototype.push
|
||||
VueRouter.prototype.push = function push(location, onResolve, onReject) {
|
||||
if (onResolve || onReject)
|
||||
return originalPush.call(this, location, onResolve, onReject)
|
||||
return originalPush.call(this, location).catch((err) => err)
|
||||
}
|
||||
|
||||
export function resetRouter() {
|
||||
router.matcher = new VueRouter({
|
||||
base: publicPath,
|
||||
mode: routerMode,
|
||||
scrollBehavior: () => ({
|
||||
y: 0,
|
||||
}),
|
||||
routes: constantRoutes,
|
||||
}).matcher
|
||||
location.reload()
|
||||
}
|
||||
|
||||
export default router
|
||||
|
Loading…
x
Reference in New Issue
Block a user