Vue-router jump error, the address is displayed correctly, and the page does not jump.

router.js

const Login = r => require.ensure([], () => r(require("./pages/regLogin/login.vue")), "regLogin");
{
    path: "/RegLogin",
    component: regLogin,
    name: "",
    hidden: true,
    children: [
        {path: "/login", 
         component: Login,
         meta: {allowBack: false}//
        },
        
    ]
},

xx.vue

<router-link class="aHover"  to="/login"></router-link>
Nov.19,2021
The

code is not complete, but the console error will tell you the answer


< router-link class= "aHover" to= "/ RegLogin/login" > sign in < / router-link >


Don't you have a 404 page for your project? If so, does it match to the 404 page?

try this:

<router-link class="aHover" to="/RegLogin/login"></router-link>

you set name to identify a route by a name, but name:' is an empty name

.

ide/essentials/named-routes.html" rel=" nofollow noreferrer "> named routes

to link to a named route, you can pass an object to the to property of router-link:

<router-link :to="{ name: 'user', params: { userId: 123 }}">User</router-link>

change your code to

{
        path: '/RegLogin',
        component: regLogin,
        name: 'regLogin',
        //.....
   }
<router-link :to="{name:'regLogin'}"></router-link>

try

Menu