mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
18 lines
463 B
Vue
18 lines
463 B
Vue
<template>
|
|
<div>
|
|
<h1>[...slug].vue</h1>
|
|
<div>catchall at {{ $route.params.slug[0] }}</div>
|
|
<div>Middleware ran: {{ !!($route.meta.override as any)?.includes('extended middleware') }}</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
definePageMeta({
|
|
middleware: ['override'],
|
|
validate: to => to.path !== '/forbidden'
|
|
})
|
|
if (useRoute().path.includes('navigate-some-path')) {
|
|
throw createError('navigate-some-path setup running')
|
|
}
|
|
</script>
|