关于vue路由东配置
import HelloWorld from '@/components/HelloWorld'
import Layout from '@/components/Layout'
、、、、、、、、分割线、、、、、、、、、、、
export default new Router({
routes: [
{
//根目录的配置
path: '/',
name: 'HelloWorld',
component: HelloWorld
},
{
// 路径一定要写对
path: '/Layout',
name: 'Layout',
component: Layout
}
]
})
请注意 path: '/Layout' 的写法。避免界面跳转路径和界面对应不上。
网友评论