@jiaozhiye/qm-design-vue
Version:
A Component Library for Vue3.0
42 lines (41 loc) • 1.25 kB
TypeScript
import type { VNode, CSSProperties, Plugin } from 'vue';
export type Nullable<T> = T | null;
export type Arrayable<T> = T | T[];
export type ValueOf<T> = T[keyof T];
export type DeepPartial<T> = {
[P in keyof T]?: T[P] extends Record<string, unknown> ? DeepPartial<T[P]> : T[P];
};
export type JSXElement = VNode;
export type AnyObject<T> = {
[key: string]: T;
};
export type AnyFunction<T> = (...args: any[]) => T;
export type CustomHTMLElement<T> = HTMLElement & T;
export type SFCWithInstall<T> = T & Plugin;
export type ComponentSize = 'large' | 'default' | 'small' | '';
export type TimeoutHandle = ReturnType<typeof setTimeout>;
export type IntervalHandle = ReturnType<typeof setInterval>;
export declare enum SizeHeight {
large = 40,
default = 32,
small = 24
}
export type StyleValue = string | CSSProperties | Array<StyleValue>;
export type Locale = 'zh-cn' | 'en';
export type IDict = {
text: string;
value: string | number;
disabled?: boolean;
children?: Array<IDict> | Nullable<undefined>;
};
export type IAuth = {
dataIndex?: string;
visible?: number;
disabled?: number;
secretName?: string;
};
export type AjaxResponse<T = any> = {
code: number;
data: T;
message: string;
};