current position:Home>Router link cannot jump into router view (Vue)

Router link cannot jump into router view (Vue)

2022-02-03 00:19:11 CSDN Q & A

The routing configuration is as follows :

{    path: '/foe',    component: Layout,    hidden: true,    children: [      {        path: 'index',        component: (resolve) => require(['@/views/zeiss/foe/index'], resolve),        name: 'foeIndex',        meta: { title: '( exit )' }      },      {        path: 'detail',        component: (resolve) => require(['@/views/zeiss/foe/detail'], resolve),        name: 'foeDetail',        meta: { title: ' Export details ' }      }    ]  },

The page code is as follows :
index Of

<template>  <div>    <router-link to="/foe/detail"> Double click in </router-link>    <router-view />  </div></template>

detail Of

<template>  <div>detail</div></template>

Page effects :


After clicking


put questions to : Isn't it supposed to be “ Double click in ” The following shows “detail” Do you ? Why open a new page , solve

Refer to the answer 1:

Double click to enter without turning into a The labels are , It indicates that there is something wrong or router No, right , Look at the console

Refer to the answer 2:

Refer to the answer 3:
Try this

 <router-link to="foe/detail"> Double click in </router-link>

Refer to the answer 4:

copyright notice
author[CSDN Q & A],Please bring the original link to reprint, thank you.

Random recommended