Skip to content

Commit 8657155

Browse files
committed
fix: fix dynamic route types
1 parent 6e8c4d6 commit 8657155

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/pages/dynamic/[id].vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
</route>
99

1010
<script lang="ts" setup>
11+
import type { RouteLocationNormalizedLoaded } from 'vue-router/auto'
12+
1113
const { t } = useI18n()
1214
1315
const { back } = useBack()
1416
15-
const route = useRoute()
17+
const route = useRoute() as RouteLocationNormalizedLoaded<'dynamic'>
1618
1719
const title = computed(() => {
1820
return route.params.id

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
],
1010
"baseUrl": ".",
1111
"module": "ESNext",
12-
"moduleResolution": "node",
12+
"moduleResolution": "Bundler",
1313
"paths": {
1414
"@/*": [
1515
"src/*"
@@ -18,9 +18,9 @@
1818
"resolveJsonModule": true,
1919
"types": [
2020
"vite/client",
21-
"@intlify/unplugin-vue-i18n/messages",
2221
"unplugin-vue-router/client",
2322
"vite-plugin-vue-layouts/client",
23+
"@intlify/unplugin-vue-i18n/messages",
2424
"vitest"
2525
],
2626
"allowJs": true,

0 commit comments

Comments
 (0)