UNPKG

maz-ui

Version:

A standalone components library for Vue.Js 3 & Nuxt.Js 3

34 lines (33 loc) 1.02 kB
import { Plugin } from 'vue'; type LoaderId = string | symbol | number; export declare class WaitHandler { private _loaders; get loaders(): import('vue').ComputedRef<LoaderId[]>; stop(loaderId?: LoaderId): this; start(loaderId?: LoaderId): this; isLoading(loaderId?: LoaderId): boolean; get anyLoading(): import('vue').ComputedRef<boolean>; } export declare const waitInstance: WaitHandler; export declare const WaitPlugin: Plugin; declare module '@vue/runtime-core' { interface ComponentCustomProperties { /** * Wait handler instance * @description You should install the plugin to use this property * @examl * ```ts * import { WaitPlugin } from 'maz-ui/plugins/wait' * import { createApp } from 'vue' * * const app = createApp(App) * app.use(WaitPlugin) * * const wait = useWait() * wait.start() * ``` */ $mazWait: WaitHandler; } } export {};