auto-tools
Version:
常用函数的封装使用
119 lines (118 loc) • 3.22 kB
TypeScript
export declare type TBase = string | number | boolean;
export declare type TBaseNull = TBase | undefined | null;
export declare type TBaseValNull = TBaseNull | Array<TBaseNull>;
export interface IBaseObj {
[propName: string]: TBase | Array<TBase>;
}
export interface IBaseObjNull {
[propName: string]: TBaseNull | Array<TBaseNull>;
}
export interface IObjNumber {
[propName: string]: number;
}
export interface IObjAny {
[propName: string]: any;
}
export interface IObj {
[propName: string]: TBaseNull | Function | Array<TBaseNull> | Array<IObj> | IObj;
}
export interface IOptionNo {
label: string;
value: number;
}
export interface IOptionStr {
label: string;
value: string;
}
export interface IOptionStrNo {
label: string;
value: string | number;
}
export interface IFOption {
label: string;
value: string;
disabled?: boolean;
}
export interface IOptionMore {
label: string;
value: string | number;
[propName: string | number]: any;
}
export interface IBackendTree {
id: number | string;
parentId: number | string;
}
export interface ITreeNode extends IBackendTree {
children?: ITreeNode[];
}
/************************************************************* 菜单相关 开始 ***********************************************************/
export interface IRoute {
path: string;
name?: string;
component: () => Promise<any>;
children?: Array<IRoute>;
meta?: IObjAny;
}
export declare type IReqMth = 'GET' | 'POST' | 'DELETE' | 'PUT';
export interface ICreateUpdate {
createTime: number | string;
creatorName: string;
updateTime: number | string;
updaterName: string;
}
export declare enum MENU_TYPE {
PAGE = "P",
DIR = "D",
BUTTON = "B"
}
export interface IMenu extends ICreateUpdate {
id: string | number;
menuName: string;
menuType: string;
parentId: string | number;
perms: string;
path?: string;
index: number;
icon?: string;
platformId: string | number;
platformStr?: string;
reqMethod?: IReqMth;
visible: 0 | 1;
}
export interface IBackMenuField {
id?: string;
menuName?: string;
menuType?: string;
parentId?: string;
perms?: string;
path?: string;
index?: string;
icon?: string;
platformId?: string;
platformStr?: string;
reqMethod?: string;
visible?: string;
componentPath?: string;
children?: string;
createTime?: string;
creatorName?: string;
updateTime?: string;
updaterName?: string;
}
export interface IBackMenu extends IMenu {
componentPath?: string;
children?: Array<IBackMenu>;
}
export interface IFontMenu extends IMenu {
component?: () => Promise<any>;
children?: Array<IFontMenu>;
}
export interface ISiderShowMenu {
title: string;
isClass1: boolean;
routeKey?: string;
menuType: string;
icon?: string;
children?: Array<ISiderShowMenu> | [];
}
/************************************************************* 菜单相关 结束 ***********************************************************/