fix: route params (#44)
This commit is contained in:
parent
1da18b38a8
commit
75eb3da88a
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{ name: string }>()
|
||||
const params = useRoute('/hi/[name]').params
|
||||
const router = useRouter()
|
||||
</script>
|
||||
|
||||
@ -7,7 +7,7 @@ const router = useRouter()
|
||||
<div>
|
||||
<div i-carbon-pedestrian inline-block text-4xl />
|
||||
<p>
|
||||
Hi, {{ props.name }}
|
||||
Hi, {{ params.name }}
|
||||
</p>
|
||||
<p text-sm op50>
|
||||
<em>Dynamic route!</em>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user