javascript - vue sub-route matching rendering to top-level view layer problem
世界只因有你
世界只因有你 2017-05-16 13:43:03
0
1
487

const routes = [
    { path: '/',component: strategyIndex,
        children: [
            { path: 'strategy/:id', component: strategyList },
            { path:'/details/:catid',component: strategyDetails}
        ]
    },
    {
        path:'*',
        redirect:'/'
    }
]

I want to render the components of the routing article details page matched by /details/:catid in the top layer of router-view. However, since it is a sub-route, it can only be rendered in the second layer of router-view. Is there any way to do this? solve?

世界只因有你
世界只因有你

reply all(1)
Ty80

Then why don’t you extract it and put it in the first layer of routing

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template