mirror of
https://github.com/xxxsf/vue3-h5-template.git
synced 2025-04-06 05:23:46 +08:00
36 lines
680 B
JavaScript
36 lines
680 B
JavaScript
/* 路由配置全写这里 */
|
|
import Vue from 'vue'
|
|
import VueRouter from 'vue-router'
|
|
|
|
/* 开启debug模式 */
|
|
Vue.config.debug = true
|
|
Vue.use(VueRouter);
|
|
|
|
import Index from '../pages/index.vue'
|
|
import News from '../pages/news.vue'
|
|
import secondcomponent from '../pages/otherPages.vue'
|
|
import thirdcomponent from '../pages/otherPages2.vue'
|
|
|
|
export default new VueRouter({
|
|
mode: 'history',
|
|
base: __dirname,
|
|
routes: [
|
|
{
|
|
path: '/index',
|
|
component: Index
|
|
},
|
|
{
|
|
path: '/news',
|
|
component: News
|
|
},
|
|
{
|
|
path: '/second',
|
|
component: secondcomponent
|
|
},
|
|
{
|
|
path: '/third',
|
|
component: thirdcomponent
|
|
}
|
|
]
|
|
})
|