路由配置如下:
{
path: '/foe',
component: Layout,
hidden: true,
children: [
{
path: 'index',
component: (resolve) => require(['@/views/zeiss/foe/index'], resolve),
name: 'foeIndex',
meta: { title: '(出口)' }
},
{
path: 'detail',
component: (resolve) => require(['@/views/zeiss/foe/detail'], resolve),
name: 'foeDetail',
meta: { title: '出口详情' }
}
]
},
页面代码如下:
index的
<template>
<div>
<router-link to="/foe/detail">双击进入</router-link>
<router-view />
</div>
</template>
detail的
<template>
<div>detail</div>
</template>
页面效果:
点击后
提问:难道不是应该在“双击进入”的下面显示“detail”吗?为什么会打开一个新的页面出来,求解