sard-uniapp
Version:
sard-uniapp 是一套基于 Uniapp + Vue3 框架开发的兼容多端的 UI 组件库
34 lines (33 loc) • 1.09 kB
TypeScript
import { type NotifyProps } from '../notify/common';
export interface NotifyAgentProps extends NotifyProps {
id?: string;
}
export declare const defaultNotifyAgentProps: () => {
id: string;
type: NotifyProps["type"];
position: NotifyProps["position"];
duration: number;
timeout: number;
};
export declare const imperativeName = "notify";
export interface NotifyImperative {
show(newProps: Record<string, any>): void;
hide(): void;
}
export type NotifyOptions = NotifyAgentProps;
export interface NotifySimpleShowFunction {
(options: NotifyOptions): void;
(message: string, options?: NotifyOptions): void;
}
export interface NotifyShowFunction {
(optionsOrMessage: string | NotifyOptions, options?: NotifyOptions, internalType?: NotifyOptions['type']): void;
}
export type NotifyFunction = NotifySimpleShowFunction & {
success: NotifySimpleShowFunction;
warning: NotifySimpleShowFunction;
error: NotifySimpleShowFunction;
hide: (id?: string) => void;
hideAll: () => void;
};
declare const notify: NotifyFunction;
export { notify };