UNPKG

@extclp/vexip-ui

Version:

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

44 lines (43 loc) 1.36 kB
import { default as Component } from './modal.vue'; import { AppContext, ComponentPublicInstance, MaybeRef } from 'vue'; import { ModalProps } from './props'; import { ModalCommonSlot } from './symbol'; export type ModalOptions = Omit<ModalProps, 'active' | 'transfer' | 'loading' | 'autoRemove'> & { /** * Specify the app context, ensue the modal using same context */ appContext: AppContext; /** * Specify whether the modal is loading */ loading: MaybeRef<boolean>; /** * Another way to use default slot */ renderer: ModalCommonSlot; /** * Another way to use header slot */ headerRenderer: ModalCommonSlot; /** * Another way to use title slot */ titleRenderer: ModalCommonSlot; /** * Another way to use close slot */ closeRenderer: ModalCommonSlot; /** * Another way to use footer slot */ footerRenderer: ModalCommonSlot; }; export declare function useModal(options?: Partial<ModalOptions>): () => Promise<void>; declare const Modal: typeof Component & { open: typeof useModal; }; export { Modal }; export { modalProps } from './props'; export type ModalExposed = ComponentPublicInstance & InstanceType<typeof Component>; export type { ModalProps, ModalCProps } from './props'; export type { ModalSlotParams } from './symbol';