Nuxt/test/fixtures/basic/pages/middleware-abort.vue

19 lines
359 B
Vue
Raw Permalink Normal View History

<script setup lang="ts">
definePageMeta({
middleware: () => {
if (import.meta.server || useNuxtApp().isHydrating) { return }
return abortNavigation({
fatal: true
})
}
})
const router = useRouter()
onNuxtReady(() => router.push({ path: '/middleware-abort', force: true }))
</script>
<template>
<div>
<!-- -->
</div>
</template>