types: 修改类型错误

This commit is contained in:
kailong321200875 2023-09-25 16:10:30 +08:00
parent 9bcc176d16
commit 4760733bbe
1 changed files with 3 additions and 2 deletions

5
types/router.d.ts vendored
View File

@ -57,7 +57,7 @@ type Component<T = any> =
| (() => Promise<T>) | (() => Promise<T>)
declare global { declare global {
declare interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> { declare interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta' | 'children'> {
name: string name: string
meta: RouteMetaCustom meta: RouteMetaCustom
component?: Component | string component?: Component | string
@ -66,7 +66,8 @@ declare global {
fullPath?: string fullPath?: string
} }
declare interface AppCustomRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> { declare interface AppCustomRouteRecordRaw
extends Omit<RouteRecordRaw, 'meta' | 'component' | 'children'> {
name: string name: string
meta: RouteMetaCustom meta: RouteMetaCustom
component: string component: string