瀏覽代碼

types: 修改类型错误

kailong321200875 1 年之前
父節點
當前提交
4760733bbe
共有 1 個文件被更改,包括 3 次插入2 次删除
  1. 3 2
      types/router.d.ts

+ 3 - 2
types/router.d.ts

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