nuxt-typed-router 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -317,7 +317,7 @@ function createRuntimePluginFile(routesDeclTemplate) {
|
|
|
317
317
|
function createRuntimeHookFile(routesDeclTemplate) {
|
|
318
318
|
return `
|
|
319
319
|
import { getCurrentInstance } from 'vue';
|
|
320
|
-
import { useNuxtApp } from '
|
|
320
|
+
import { useNuxtApp } from 'nuxt3';
|
|
321
321
|
|
|
322
322
|
export const useTypedRouter = () => {
|
|
323
323
|
const { $router } = useNuxtApp();
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
import { getCurrentInstance } from 'vue';
|
|
2
|
-
import { useNuxtApp } from '
|
|
2
|
+
import { useNuxtApp } from 'nuxt3';
|
|
3
3
|
|
|
4
4
|
export const useTypedRouter = () => {
|
|
5
5
|
const { $router } = useNuxtApp();
|
|
6
6
|
|
|
7
|
-
const routesList = {
|
|
8
|
-
activate: 'activate',
|
|
9
|
-
index: 'index',
|
|
10
|
-
childOne: {
|
|
11
|
-
childOneChildOneSubOne: 'parent-child-one-child-one-sub-one',
|
|
12
|
-
user: { index: 'parent-child-one-child-one-sub-one-user' },
|
|
13
|
-
childOneChildOneSubTwo: 'parent-child-one-child-one-sub-two',
|
|
14
|
-
index: 'parent-child-one',
|
|
15
|
-
},
|
|
16
|
-
childTwo: {
|
|
17
|
-
childTwoId: 'parent-child-two-id',
|
|
18
|
-
childTwoChildOneSubOne: 'parent-child-two-child-one-sub-one',
|
|
19
|
-
index: 'parent-child-two',
|
|
20
|
-
profile: {
|
|
21
|
-
id: {
|
|
22
|
-
slug: { index: 'parent-child-two-profile-id-slug' },
|
|
23
|
-
index: 'parent-child-two-profile-id',
|
|
24
|
-
},
|
|
25
|
-
index: 'parent-child-two-profile',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
rootPage: 'rootPage',
|
|
29
|
-
};
|
|
7
|
+
const routesList = {};
|
|
30
8
|
|
|
31
9
|
return {
|
|
32
10
|
router: $router,
|
|
@@ -1,32 +1,10 @@
|
|
|
1
1
|
import { getCurrentInstance } from 'vue';
|
|
2
|
-
import { useNuxtApp } from '
|
|
2
|
+
import { useNuxtApp } from 'nuxt3';
|
|
3
3
|
|
|
4
4
|
export const useTypedRouter = () => {
|
|
5
5
|
const { $router } = useNuxtApp();
|
|
6
6
|
|
|
7
|
-
const routesList = {
|
|
8
|
-
activate: 'activate',
|
|
9
|
-
index: 'index',
|
|
10
|
-
childOne: {
|
|
11
|
-
childOneChildOneSubOne: 'parent-child-one-child-one-sub-one',
|
|
12
|
-
user: { index: 'parent-child-one-child-one-sub-one-user' },
|
|
13
|
-
childOneChildOneSubTwo: 'parent-child-one-child-one-sub-two',
|
|
14
|
-
index: 'parent-child-one',
|
|
15
|
-
},
|
|
16
|
-
childTwo: {
|
|
17
|
-
childTwoId: 'parent-child-two-id',
|
|
18
|
-
childTwoChildOneSubOne: 'parent-child-two-child-one-sub-one',
|
|
19
|
-
index: 'parent-child-two',
|
|
20
|
-
profile: {
|
|
21
|
-
id: {
|
|
22
|
-
slug: { index: 'parent-child-two-profile-id-slug' },
|
|
23
|
-
index: 'parent-child-two-profile-id',
|
|
24
|
-
},
|
|
25
|
-
index: 'parent-child-two-profile',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
rootPage: 'rootPage',
|
|
29
|
-
};
|
|
7
|
+
const routesList = {};
|
|
30
8
|
|
|
31
9
|
return {
|
|
32
10
|
router: $router,
|