2
模板所以我有这样的路线:VUE路由器将不渲染嵌套路线
const routes = [{
path: '/',
component: Home,
children: [
{
path: "/health"
children: [
{
path: 'overview'
component: Overview
},
{
path: 'blood',
component: Blood
}
]
}
]
}]
,并在首页组件我有这样的事情:
<template>
<div id="home">
<router-view></router-view>
</div>
</template>
但是,当我导航到/health/overview
和/health/blood
路由,与组件对应的模板将不会呈现。我检查了应用程序$route
对象,它们正确地检测路线和组件。只是模板不会呈现。如果有帮助,我的App.vue
中也有<router-view>
。
难道有多个嵌套路线吗?或者我错过了什么?
谢谢,工作就像一个魅力! –