Files
element-plus/packages/loading/src/loading.d.ts
bastarder ee3b42fb09 feat(loading): add loading component (#447)
* refactor(loading): refactored loading component

* refactor(loading): use render & createVNode instead of createApp

Co-authored-by: Ryan <ryanzhao2128@gmail.com>
2020-10-23 10:15:49 +08:00

48 lines
1.1 KiB
TypeScript

import type { Ref, VNode } from 'vue'
export type ILoadingOptions = {
parent?: ILoadingParentElement
background?: string
spinner?: boolean | string
text?: string
fullscreen?: boolean
body?: boolean
lock?: boolean
customClass?: string
visible?: boolean
target?: string | HTMLElement
}
export type ILoadingInstance = {
parent?: Ref<ILoadingParentElement>
background?: Ref<string>
spinner?: Ref<boolean | string>
text?: Ref<string>
fullscreen?: Ref<boolean>
body?: Ref<boolean>
lock?: Ref<boolean>
customClass?: Ref<string>
visible?: Ref<boolean>
target?: Ref<string | HTMLElement>
originalPosition?: Ref<string>
originalOverflow?: Ref<string>
setText: (text: string) => void
close: () => void
handleAfterLeave: () => void
vm: VNode
$el: HTMLElement
}
export type ILoadingGlobalConfig = {
fullscreenLoading: ILoadingInstance
}
export type ILoadingCreateComponentParams = {
options: ILoadingOptions
globalLoadingOption: ILoadingGlobalConfig
}
export interface ILoadingParentElement extends HTMLElement {
vLoadingAddClassList?: () => void
}