WebIndex/pages/error/[code].vue
2025-01-13 23:12:06 +08:00

16 lines
272 B
Vue

<script setup lang="ts">
const route = useRoute(),
errorCode = parseInt(route.params.code as string, 10)
if (import.meta.server) {
throw createError({
statusCode: errorCode,
})
}
else { showError({ statusCode: errorCode }) }
</script>
<style scoped>
</style>