mixone
Version:
MixOne is a Node scaffolding tool implemented based on Vite, used for compiling HTML5, JavasCript, Vue, React and other codes. It supports packaging Web applications with multiple HTML entry points (BS architecture) and desktop installation packages (CS a
31 lines (27 loc) • 606 B
JavaScript
import Vue from 'vue';
import VueRouter from 'vue-router';
// 使用 Vue Router 插件
Vue.use(VueRouter);
const routes = [
{
path: '/',
name: 'Index',
component: () => import('./Index.vue')
},
{
path: '/help',
name: 'Help',
component: () => import('./Help.vue')
},
{
path: '/second',
name: 'Second',
component: () => import('./Second.vue')
},
];
// Vue 2.7 的 Vue Router 初始化方式
const router = new VueRouter({
mode: 'hash',
routes
});
export default router;