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>
。
難道有多個嵌套路線嗎?或者我錯過了什麼?
謝謝,工作就像一個魅力! –