Crunchy
2024-05-16 ea406e0b3aed9cd0b57a37e4ffa5b55892fa1434
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import Vue from 'vue'
import Router from 'vue-router'
import Index from "../view/index.vue";
import NotFind from "../view/404.vue"
import Enter from "../view/enter.vue"
import { name } from 'file-loader';
 
Vue.use(Router)
 
//获取原型对象上的push函数
const originalPush = Router.prototype.push
//修改原型对象中的push方法
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}
 
export default new Router({
  mode: 'history',
  routes: [{
    path: "/",
    component: Index
  },
  {
    path: "/enter",
    component: () => import("../view/enter.vue")
  },{
        path: "/test/excel",
        component: () => import("../components/tool/excel.vue")
    },{
    path: "/wordEdit",
    component: () => import("../components/tool/onlyoffice.vue")
  }]
})