From 539d1ce6b955d5d56b21d97590a2a684c400f64a Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123 <819527061@qq.com> Date: 星期三, 11 一月 2023 09:55:16 +0800 Subject: [PATCH] 细节调节 --- src/router/router.js | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/router/router.js b/src/router/router.js index 4653ea7..ac1b936 100644 --- a/src/router/router.js +++ b/src/router/router.js @@ -1,15 +1,12 @@ import Vue from 'vue' import VueRouter from 'vue-router' -import PageRouter from './page/' -import ViewsRouter from './views/' -import ShowRouter from './show/index' import padRouter from './pad/index' import AvueRouter from './avue-router' import Store from '../store/' Vue.use(VueRouter) //鍒涘缓璺敱 export const createRouter = () => new VueRouter({ - routes: [ ...ViewsRouter,...ShowRouter, ...padRouter] + routes: [ ...padRouter] }) const Router = createRouter() @@ -26,10 +23,10 @@ const originalPush = VueRouter.prototype.push const originalReplace = VueRouter.prototype.replace //push -VueRouter.prototype.push = function push(location, onResolve, onReject) { +/*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) -} +}*/ //replace VueRouter.prototype.replace = function push(location, onResolve, onReject) { if (onResolve || onReject) return originalReplace.call(this, location, onResolve, onReject) -- Gitblit v1.9.1