Fix: 修正国际化的显示、跳转问题

This commit is contained in:
2025-08-16 15:40:08 +08:00
parent daa91ac56f
commit eaf7d3be38
8 changed files with 94 additions and 37 deletions

View File

@ -14,6 +14,7 @@
</template>
<script setup lang="ts">
interface Props {
name: string
description: string
@ -23,13 +24,13 @@ interface Props {
}
const props = defineProps<Props>()
const router = useRouter()
const localePath = useLocalePath()
const handleClick = () => {
// 优先使用 slug如果没有则使用 id
const routeParam = props.slug || props.id
if (routeParam) {
router.push(`/productions/${routeParam}`)
navigateTo(localePath(`/productions/${routeParam}`))
}
}
</script>