fix: Add 404 page with meta to fix route flicker

This commit is contained in:
CharleeWa 2024-05-31 11:26:28 +08:00
parent 59ebaacce9
commit 43990396dd
2 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,11 @@
<script setup lang="ts">
definePage({
name: '404',
meta: {
level: 2,
},
})
const router = useRouter()
function onBack() {

View File

@ -19,7 +19,7 @@ declare module 'vue-router/auto-routes' {
*/
export interface RouteNamedMap {
'home': RouteRecordInfo<'home', '/', Record<never, never>, Record<never, never>>,
'/[...all]': RouteRecordInfo<'/[...all]', '/:all(.*)', { all: ParamValue<true> }, { all: ParamValue<false> }>,
'404': RouteRecordInfo<'404', '/:all(.*)', { all: ParamValue<true> }, { all: ParamValue<false> }>,
'charts': RouteRecordInfo<'charts', '/charts', Record<never, never>, Record<never, never>>,
'counter': RouteRecordInfo<'counter', '/counter', Record<never, never>, Record<never, never>>,
'KeepAlive': RouteRecordInfo<'KeepAlive', '/keepalive', Record<never, never>, Record<never, never>>,