Vue router priority

how can I directly access / render2 this route?

const routes = [{
  path: "/",
  redirect: "/index"
}, {
  path: "/index",
  component: Index,
  meta: { keepAlive: true },
  children: [{
    path: "/preview",
    component: PreView,
    children: [{
      path: "/render2",
      component: render2
    }]
  }]
}, {
  path: "/render2",
  component: render2
}]

because

is configured

`children: [{

]
  path: "/render2",
  component: render2
}]`

visited / preview/render2 every time

how can I access both / preview/render2
and / render2 directly?

Oct.11,2021

children: [{
      path: '/render2',
      component: render2
    }]
Change

to

children: [{
      path: 'render2',
      component: render2
    }]

add a name to the route:

{
  path: '/render2',
  name: 'Render2',
  component: render2
}
router.push({ name: 'Render2' })

you don't have to take'/'in the subpath. Try it like this.

children: [{
    path: 'preview',
    component: PreView,
    children: [{
      path: 'render2',
      component: render2
    }]
  }]
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3dc4a-2c3c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3dc4a-2c3c3.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?