Files
sub2api/frontend/src/router/meta.d.ts

47 lines
838 B
TypeScript
Raw Normal View History

2025-12-18 13:50:39 +08:00
/**
* Type definitions for Vue Router meta fields
* Extends the RouteMeta interface with custom properties
*/
import 'vue-router'
2025-12-18 13:50:39 +08:00
declare module 'vue-router' {
interface RouteMeta {
/**
* Whether this route requires authentication
* @default true
*/
requiresAuth?: boolean
2025-12-18 13:50:39 +08:00
/**
* Whether this route requires admin role
* @default false
*/
requiresAdmin?: boolean
2025-12-18 13:50:39 +08:00
/**
* Page title for this route
*/
title?: string
2025-12-18 13:50:39 +08:00
/**
* Optional breadcrumb items for navigation
*/
breadcrumbs?: Array<{
label: string
to?: string
}>
2025-12-18 13:50:39 +08:00
/**
* Icon name for this route (for sidebar navigation)
*/
icon?: string
2025-12-18 13:50:39 +08:00
/**
* Whether to hide this route from navigation menu
* @default false
*/
hideInMenu?: boolean
2025-12-18 13:50:39 +08:00
}
}