import type { ExtendProps } from "../common/types"; import type { PropType, ExtractPropTypes } from "vue"; export declare const nButtonProps: () => { readonly type: { readonly type: PropType; }; readonly secondary: { readonly type: BooleanConstructor; readonly default: false; }; readonly warning: { readonly type: BooleanConstructor; readonly default: false; }; /** * 点击事件延时时间, 用于防止重复点击. * 单位毫秒. 默认 250 毫秒. */ readonly delay: { readonly type: NumberConstructor; readonly default: 250; }; readonly onClick: { readonly type: PropType<(event: MouseEvent) => void>; }; }; export declare type NButtonProps = ExtractPropTypes>; export declare const nLoadingButtonProps: () => { /** * 该参数与 loadingClick 冲突,当 该参数存在时 loadingClick 失效. */ readonly loading: { readonly type: PropType; }; /** * 点击事件回调函数. 该函数执行前会将 loading 状态设置为 true.并且当返回值为 Promise 时, 会在 Promise 执行完毕后将 loading 状态设置为 false. */ readonly onLoadingClick: { readonly type: PropType<(event: MouseEvent) => Promise | undefined>; }; readonly onClick: { readonly type: PropType<(event: MouseEvent) => void>; }; }; export declare type NLoadingButtonProps = ExtendProps, NButtonProps>; export interface NButtonEmits { click: (event: MouseEvent) => void; loadingClick: (event: MouseEvent) => Promise | undefined; }