vue路由这么写有什么问题吗?为什么是空白,求助

{
        path: '/',
        name: 'Index',
        component: Index,
        Children:[
            {path: "ArticleList",component:ArticleList},
            {path: "Compositions",component:Compositions}
        ]
    },

image.png
访问localhost:8080还是正常的,为什么访问localhost:8080/ArticleList是空白的?没报错,应该不是组件的问题,不知道为什么,求助

阅读 1.5k
2 个回答

children 不应该大写。如果我没记错,Vue 里没有需要大写的地方。

除了Children要小写,path里面path: "ArticleList"应该是path: "/ArticleList"

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题