Nuxt/test/fixtures/basic/pages/[...slug].vue

15 lines
351 B
Vue
Raw Permalink Normal View History

2022-03-08 18:03:21 +00:00
<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>
2022-03-08 18:03:21 +00:00
</div>
</template>
<script setup lang="ts">
definePageMeta({
middleware: ['override'],
validate: to => to.path !== '/forbidden'
})
</script>