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.
 
 
 

31 lines
700 B

import VueRouter from "vue-router";
// 引入组件
import About from "@/pages/About.vue"
import Home from "@/pages/Home.vue"
import News from "@/pages/News.vue"
import Message from "@/pages/Message.vue";
// 创建一个路由器
export default new VueRouter({
routes: [
{
path: '/about',
component: About
},
{
path: '/home',
component: Home,
children: [
{
path: 'news',
component: News,
},
{
path: 'message',
component: Message,
}
]
},
]
})