Frontend/進階_NUXT框架/nuxt-demo/pages/test_file_1/user-[id]-n-[name].vue
2024-10-31 12:17:13 +08:00

12 lines
254 B
Vue

<template>
<div>
<p>id: {{ $route.params.id }}</p>
<p>name: {{ $route.params.name }}</p>
</div>
</template>
<script setup>
const route = useRoute()
console.log(route.params.id)
console.log(route.params.name)
</script>