t-fighting-design
Version:
Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.
38 lines (33 loc) • 761 B
TypeScript
/**
* Load 类所需要的 props 参数
*/
export interface LoadNeedImagePropsInterface {
src: string
errSrc: string
rootMargin: string
lazy: boolean
load: Function
error: Function
}
export interface LazyInterface {
observer(): IntersectionObserver
lazyCreateImg(): void
}
export interface LoadImageInterface {
(
node: HTMLImageElement,
prop: LoadNeedImagePropsInterface,
callback: callbackInterface | null
): void
}
export interface LoadInterface {
node: HTMLImageElement
props: LoadNeedImagePropsInterface
callback: callbackInterface | null
loadCreateImg(errSrc?: string): void
onerror(evt: Event): void
onload(evt: Event, src: string): void
}
export interface CallbackInterface {
(params: boolean): void
}