-
zhangwei
2 天以前 7674a4144ba793196607578f8a57771d6beb22c7
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
// 申明外部 npm 插件模块
declare module 'vue-grid-layout';
declare module 'qrcodejs2-fixes';
declare module 'splitpanes';
declare module 'js-cookie';
declare module '@wangeditor/editor-for-vue';
declare module 'js-table2excel';
declare module 'qs';
declare module 'sortablejs';
declare module 'vue-plugin-hiprint';
declare module 'vcrontab-3';
 
// 声明一个模块,防止引入文件时报错
declare module '*.json';
declare module '*.png';
declare module '*.jpg';
declare module '*.scss';
declare module '*.ts';
declare module '*.js';
 
// 声明文件,*.vue 后缀的文件交给 vue 模块来处理
declare module '*.vue' {
    import type { DefineComponent } from 'vue';
    const component: DefineComponent<{}, {}, any>;
    export default component;
}
 
// 声明文件,定义全局变量
/* eslint-disable */
declare interface Window {
    nextLoading: boolean;
    BMAP_SATELLITE_MAP: any;
    BMap: any;
    __env__: any;
}
 
// 声明路由当前项类型
declare type RouteItem<T = any> = {
    path: string;
    name?: string | symbol | undefined | null;
    redirect?: string;
    k?: T;
    meta?: {
        title?: string;
        isLink?: string;
        isHide?: boolean;
        isKeepAlive?: boolean;
        isAffix?: boolean;
        isIframe?: boolean;
        roles?: string[];
        icon?: string;
        isDynamic?: boolean;
        isDynamicPath?: string;
        isIframeOpen?: string;
        loading?: boolean;
    };
    children: T[];
    query?: { [key: string]: T };
    params?: { [key: string]: T };
    contextMenuClickId?: string | number;
    commonUrl?: string;
    isFnClick?: boolean;
    url?: string;
    transUrl?: string;
    title?: string;
    id?: string | number;
};
 
// 声明路由 to from
declare interface RouteToFrom<T = any> extends RouteItem {
    path?: string;
    children?: T[];
}
 
// 声明路由当前项类型集合
declare type RouteItems<T extends RouteItem = any> = T[];
 
// 声明 ref
declare type RefType<T = any> = T | null;
 
// 声明 HTMLElement
declare type HtmlType = HTMLElement | string | undefined | null;
 
// 申明 children 可选
declare type ChilType<T = any> = {
    children?: T[];
};
 
// 申明 数组
declare type EmptyArrayType<T = any> = T[];
 
// 申明 对象
declare type EmptyObjectType<T = any> = {
    [key: string]: T;
};
 
// 申明 select option
declare type SelectOptionType = {
    value: string | number;
    label: string | number;
};
 
// 鼠标滚轮滚动类型
declare interface WheelEventType extends WheelEvent {
    wheelDelta: number;
}
 
// table 数据格式公共类型
declare interface TableType<T = any> {
    total: number;
    loading: boolean;
    param: {
        pageNum: number;
        pageSize: number;
        [key: string]: T;
    };
}
 
// 字典数据结构
export interface DictItem {
    typeCode: string;
    label: string;
    value: string;
    name: string;
    status: string;
    orderNo: number;
    remark?: string;
    tagType?: string;
    extData?: string;
    styleSetting?: string;
    classSetting?: string;
    [key: string]: any;
}