fix: AppRouteRecordRaw types(from xingyu)
parent
b4d1c678fd
commit
6cb908e688
|
@ -1,5 +1,23 @@
|
|||
import type { Component } from 'vue';
|
||||
import type { RouteRecordRaw } from 'vue-router';
|
||||
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
|
||||
|
||||
/** 路由元信息 */
|
||||
interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
|
||||
children?: AppRouteRecordRaw[];
|
||||
component?: any;
|
||||
componentName?: string;
|
||||
components?: any;
|
||||
fullPath?: string;
|
||||
icon?: string;
|
||||
id?: any;
|
||||
keepAlive?: boolean;
|
||||
meta: RouteMeta;
|
||||
name: string;
|
||||
parentId?: number;
|
||||
props?: any;
|
||||
sort?: number;
|
||||
visible?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* 扩展路由原始对象
|
||||
|
@ -73,4 +91,4 @@ interface MenuRecordRaw extends MenuRecordBadgeRaw {
|
|||
show?: boolean;
|
||||
}
|
||||
|
||||
export type { ExRouteRecordRaw, MenuRecordBadgeRaw, MenuRecordRaw };
|
||||
export type { ExRouteRecordRaw, MenuRecordBadgeRaw, MenuRecordRaw, AppRouteRecordRaw };
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import type { BasicUserInfo } from '@vben-core/typings';
|
||||
import type { RouteMeta, RouteRecordRaw } from 'vue-router';
|
||||
import type { AppRouteRecordRaw, BasicUserInfo } from '@vben-core/typings';
|
||||
|
||||
/** 用户信息 */
|
||||
interface UserInfo extends BasicUserInfo {
|
||||
|
@ -21,23 +20,4 @@ interface AuthPermissionInfo {
|
|||
|
||||
}
|
||||
|
||||
/** 路由元信息 */
|
||||
interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> {
|
||||
|
||||
children?: AppRouteRecordRaw[];
|
||||
component?: any;
|
||||
componentName?: string;
|
||||
components?: any;
|
||||
fullPath?: string;
|
||||
icon?: string;
|
||||
keepAlive?: boolean;
|
||||
meta: RouteMeta;
|
||||
name: string;
|
||||
parentId?: number;
|
||||
props?: any;
|
||||
sort?: number;
|
||||
visible?: boolean;
|
||||
|
||||
}
|
||||
|
||||
export type { UserInfo, AuthPermissionInfo, AppRouteRecordRaw };
|
||||
export type { UserInfo, AuthPermissionInfo };
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import type { Router, RouteRecordRaw } from 'vue-router';
|
||||
|
||||
import type { ExRouteRecordRaw, MenuRecordRaw, RouteRecordStringComponent } from '@vben-core/typings';
|
||||
import type { ExRouteRecordRaw, MenuRecordRaw, RouteRecordStringComponent, AppRouteRecordRaw } from '@vben-core/typings';
|
||||
|
||||
import { filterTree, mapTree, isHttpUrl } from '@vben-core/shared/utils';
|
||||
import type { AppRouteRecordRaw } from '@vben/types'; // TODO @芋艿:这里的报错,解决
|
||||
|
||||
/**
|
||||
* 根据 routes 生成菜单列表
|
||||
|
|
Loading…
Reference in New Issue