我目前已经准备好这些路线(例如更改名称),并且在找出在子页面之间导航的方法时遇到问题。
我的计划是拥有多个带有子页面的父页面,以及一些仅通过子页面导航的导航箭头。
{
path: '/parentPage',
name: 'parentPage',
component: parentPage
children: [
{
path: 'childPage1',
name: 'childPage1',
component: childPage1
},
{
path: 'childPage2',
name: 'childPage2',
component: childPage2
},
{
path: 'childPage3',
name: 'childPage3',
component: childPage3
},
]
}
Run Code Online (Sandbox Code Playgroud)
但我想知道是否有办法导航到列表中的下一个和上一个孩子?
例如,如果我在“childPage2”上,我希望能够单击一个按钮导航到下一个孩子和上一个孩子?然后一旦在“childPage3”上,由于没有 childPage4 ,只有一个选项可以导航回去?
谢谢