2022-03-08 18:03:21 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-02-16 12:56:14 +00:00
|
|
|
<h1>[...slug].vue</h1>
|
2023-05-09 17:08:07 +00:00
|
|
|
<div>catchall at {{ route.params.slug?.[0] }}</div>
|
2023-01-14 00:23:20 +00:00
|
|
|
<div>Middleware ran: {{ !!($route.meta.override as any)?.includes('extended middleware') }}</div>
|
2022-03-08 18:03:21 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2022-10-10 10:18:20 +00:00
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
definePageMeta({
|
2023-01-14 00:23:20 +00:00
|
|
|
middleware: ['override'],
|
2024-10-08 19:02:42 +00:00
|
|
|
validate: to => to.path !== '/catchall/forbidden',
|
2022-10-10 10:18:20 +00:00
|
|
|
})
|
2024-10-08 19:02:42 +00:00
|
|
|
const route = useRoute('catchall-slug')
|
2023-05-09 17:08:07 +00:00
|
|
|
if (route.path.includes('navigate-some-path')) {
|
2023-04-13 09:58:25 +00:00
|
|
|
throw createError('navigate-some-path setup running')
|
|
|
|
}
|
2022-10-10 10:18:20 +00:00
|
|
|
</script>
|