Skip to content

Commit

Permalink
feat: extendRoute
Browse files Browse the repository at this point in the history
  • Loading branch information
posva committed Feb 15, 2023
1 parent 5c8c7df commit ff0195f
Show file tree
Hide file tree
Showing 11 changed files with 233 additions and 223 deletions.
18 changes: 0 additions & 18 deletions e2e/__snapshots__/routes.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,35 @@ export const routes = [
path: '/',
name: '/',
component: () => import('/routes/index.vue'),
/* no props */
/* no children */
},
{
path: '/:path(.*)',
name: '/[...path]',
component: () => import('/routes/[...path].vue'),
/* no props */
/* no children */
},
{
path: '/about',
name: '/about',
component: () => import('/routes/about.vue'),
/* no props */
/* no children */
},
{
path: '/articles',
/* no name */
/* no component */
/* no props */
children: [
{
path: ':id',
name: '/articles/[id]',
component: () => import('/routes/articles/[id].vue'),
/* no props */
/* no children */
},
{
path: ':slugs+',
name: '/articles/[slugs]+',
component: () => import('/routes/articles/[slugs]+.vue'),
/* no props */
/* no children */
}
],
Expand All @@ -51,38 +45,32 @@ export const routes = [
path: '/nested',
/* no name */
/* no component */
/* no props */
children: [
{
path: 'folder',
/* no name */
/* no component */
/* no props */
children: [
{
path: '',
name: '/nested/folder/',
component: () => import('/routes/nested/folder/index.vue'),
/* no props */
/* no children */
},
{
path: 'should',
/* no name */
/* no component */
/* no props */
children: [
{
path: 'work',
/* no name */
/* no component */
/* no props */
children: [
{
path: '',
name: '/nested/folder/should/work/',
component: () => import('/routes/nested/folder/should/work/index.vue'),
/* no props */
/* no children */
}
],
Expand All @@ -97,20 +85,17 @@ export const routes = [
path: '/optional',
/* no name */
/* no component */
/* no props */
children: [
{
path: ':doc?',
name: '/optional/[[doc]]',
component: () => import('/routes/optional/[[doc]].vue'),
/* no props */
/* no children */
},
{
path: ':docs*',
name: '/optional/[[docs]]+',
component: () => import('/routes/optional/[[docs]]+.vue'),
/* no props */
/* no children */
}
],
Expand All @@ -119,13 +104,11 @@ export const routes = [
path: '/users',
name: '/users',
component: () => import('/routes/users.vue'),
/* no props */
children: [
{
path: ':id',
name: '/users/[id]',
component: () => import('/routes/users/[id].vue'),
/* no props */
/* no children */
}
],
Expand All @@ -134,7 +117,6 @@ export const routes = [
path: '/users/new',
name: '/users.new',
component: () => import('/routes/users.new.vue'),
/* no props */
/* no children */
}
]
Expand Down
Loading

0 comments on commit ff0195f

Please sign in to comment.