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'],
|
2022-10-10 10:18:20 +00:00
|
|
|
validate: to => to.path !== '/forbidden'
|
|
|
|
})
|
2023-05-09 17:08:07 +00:00
|
|
|
const route = useRoute('slug')
|
|
|
|
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>
|