You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
flyapps/fir_client/src/router/download.js

26 lines
690 B

import Vue from 'vue'
//1.先导入
import VueRouter from 'vue-router'
//2.一定先use 一下
Vue.use(VueRouter);
// 解决push 同一个路由的错误
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
};
// import FirDownload from "@/components/FirDownload";
const router = new VueRouter({
mode: 'history',
routes: [
{
path: '/:short',
name: 'FirDownload',
// component: () => import("@/components/ShortDownload")
component: ()=>import("@/components/FirDownload")
}
]
});
export default router;