zhangnuoyan
2024-08-25 54f5cd85e43bf92266a2617994642e1b8aa5bcb5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { RouteLocation, RouteMeta, RouteRecordName } from "vue-router";
 
//类型覆盖方法,后面覆盖前面的
export type Override<P, S> = Omit<P, keyof S> & S;
 
interface RouteMetaAll extends RouteMeta {
    sort?: number;
    hidden?: boolean;
    title?: string;
    icon?: string;
    keepAliveName?: string;
    key?: string;
    navTag?: boolean;
    cache?: boolean;
    parentName?: string;
    permission?: () => boolean;
}
 
export interface RouteConfig {
    path: string;
    name?: RouteRecordName | null;
    children?: RouteConfig[];
    redirect?: string | RouteLocation;
    alias?: string | string[];
    meta?: RouteMetaAll;
    hash?: string;
    fullPath?: RouteLocation["fullPath"];
    query?: RouteLocation["query"];
    params?: RouteLocation["params"];
    component?: any;
}
 
export type _TouchEvent = TouchEvent & {
    _isScroller?: boolean;
};