@jiaozhiye/qm-design-vue
Version:
A Component Library for Vue3.0
119 lines (118 loc) • 3.84 kB
TypeScript
import type { PropType, ExtractPropTypes } from 'vue';
import type { AnyObject, AjaxResponse, ComponentSize } from '../../_utils/types';
export type HttpRequestHeader = {
[key: string]: string;
};
export type ActionConfig = {
api: (params?: Record<string, unknown>) => Promise<AjaxResponse>;
params?: AnyObject<unknown>;
};
export declare const _props: {
action: {
type: PropType<string | ActionConfig>;
required: boolean;
};
size: {
type: PropType<ComponentSize>;
validator: (val: string) => boolean;
};
fileName: {
type: StringConstructor;
};
headers: {
type: PropType<HttpRequestHeader>;
};
withCredentials: {
type: BooleanConstructor;
};
params: {
type: PropType<AnyObject<unknown>>;
};
beforeDownload: {
type: PropType<(action: string) => boolean>;
};
click: {
type: PropType<(ev: MouseEvent) => void | Promise<void>>;
};
shortcutKey: {
type: StringConstructor;
};
authConfig: {
type: PropType<import("../../_utils/types").IAuth>;
default: () => {};
};
confirm: {
type: PropType<{
title?: string | import("../../_utils/types").JSXElement | undefined;
onConfirm?: (() => void) | undefined;
onCancel?: (() => void) | undefined;
}>;
default: undefined;
};
tabindex: {
type: NumberConstructor;
};
disabled: BooleanConstructor;
type: {
readonly type: PropType<"" | "default" | "text" | "success" | "warning" | "info" | "primary" | "danger">;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
} & {
readonly default: "";
};
icon: {
readonly type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
};
nativeType: {
readonly type: PropType<"button" | "reset" | "submit">;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
} & {
readonly default: "button";
};
loading: BooleanConstructor;
loadingIcon: {
readonly type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
} & {
readonly default: () => any;
};
plain: BooleanConstructor;
text: BooleanConstructor;
link: BooleanConstructor;
bg: BooleanConstructor;
autofocus: BooleanConstructor;
round: BooleanConstructor;
circle: BooleanConstructor;
color: StringConstructor;
dark: BooleanConstructor;
autoInsertSpace: {
readonly type: PropType<boolean>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
} & {
readonly default: undefined;
};
tag: {
readonly type: PropType<string | import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions, {}, any>>;
readonly required: false;
readonly validator: ((val: unknown) => boolean) | undefined;
__epPropKey: true;
} & {
readonly default: "button";
};
};
export declare const _emits: {
success: () => boolean;
error: (err: object) => boolean;
};
export type DownloadProps = ExtractPropTypes<typeof _props>;
export type DownloadEmits = typeof _emits;