types.ts 566 B

1234567891011121314151617181920
  1. import { defineComponent } from 'vue';
  2. import type { RouteMeta, NavigationGuard } from 'vue-router';
  3. export type Component<T = any> =
  4. | ReturnType<typeof defineComponent>
  5. | (() => Promise<typeof import('*.vue')>)
  6. | (() => Promise<T>);
  7. export interface AppRouteRecordRaw {
  8. path: string;
  9. name?: string | symbol;
  10. meta?: RouteMeta;
  11. redirect?: string;
  12. component: Component | string;
  13. children?: AppRouteRecordRaw[];
  14. alias?: string | string[];
  15. props?: Record<string, any>;
  16. beforeEnter?: NavigationGuard | NavigationGuard[];
  17. fullPath?: string;
  18. }