UNPKG

@extclp/vexip-ui

Version:

A Vue 3 UI library, Highly customizability, full TypeScript, performance pretty good

53 lines (52 loc) 1.95 kB
import { App, MaybeRef } from 'vue'; import { MaybeInstance } from '@vexip-ui/hooks'; import { Key, NoticeConfig, NoticeOptions, NoticePlacement, NoticeType } from './symbol'; export type { NoticeConfig, NoticeType, NoticePlacement, NoticeOptions }; type FuzzyOptions = string | NoticeOptions; type ManagerOptions = { marker?: boolean; duration?: number; } & NoticeConfig & Record<string, unknown>; interface AipMethod { (options: NoticeOptions): () => void; (title: string, duration?: number): () => void; (title: string, content: string, duration?: number): () => void; /** @internal */ (options: FuzzyOptions, duration?: number): () => void; } export declare class NoticeManager { name: string; defaults: Record<string, unknown>; open: AipMethod; primary: AipMethod; info: AipMethod; success: AipMethod; warning: AipMethod; error: AipMethod; private _mountedApp; private _instance; private _innerApp; private _container; private _wrapper; private _mountedEl; private _installed; private _configRecord; constructor(options?: ManagerOptions); judge(state: boolean, success: string, error: string, duration?: number): void; judge(state: boolean, success: NoticeOptions, error: string, duration?: number): void; judge(state: boolean, success: string, error: NoticeOptions, duration?: number): void; judge(state: boolean, success: NoticeOptions, error: NoticeOptions): void; close(key: Key): void; config({ placement, startOffset, itemGap, ...others }: NoticeConfig & NoticeOptions): void; clone(): NoticeManager; clear(): void; destroy(): void; isDestroyed(): boolean; install(app: App, options?: ManagerOptions & { property?: string; }): void; transferTo(target: MaybeRef<string | MaybeInstance>): void; private _getInstance; private _open; } export declare const Notice: NoticeManager;