Skip to content

Commit

Permalink
fix: route params (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
zjcxl authored Dec 5, 2023
1 parent 1da18b3 commit 75eb3da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/hi/[name].vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<script setup lang="ts">
const props = defineProps<{ name: string }>()
const params = useRoute('/hi/[name]').params
const router = useRouter()
</script>

<template>
<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>
Expand Down

0 comments on commit 75eb3da

Please sign in to comment.