first commit
This commit is contained in:
55
node_modules/vant/es/lazyload/vue-lazyload/index.d.ts
generated
vendored
Normal file
55
node_modules/vant/es/lazyload/vue-lazyload/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
import type { App } from 'vue';
|
||||
|
||||
declare type ListenEvent =
|
||||
| 'scroll'
|
||||
| 'wheel'
|
||||
| 'mousewheel'
|
||||
| 'resize'
|
||||
| 'animationend'
|
||||
| 'transitionend'
|
||||
| 'touchmove';
|
||||
|
||||
// eslint-disable-next-line
|
||||
declare type Callback = (listener: any, options: LazyloadOptions) => void;
|
||||
|
||||
declare type Filter = {
|
||||
webp?: Callback;
|
||||
progressive?: Callback;
|
||||
};
|
||||
|
||||
declare type Adapter = {
|
||||
error?: Callback;
|
||||
loaded?: Callback;
|
||||
loading?: Callback;
|
||||
};
|
||||
|
||||
export declare type LazyloadOptions = {
|
||||
error?: string;
|
||||
filter?: Filter;
|
||||
silent?: boolean;
|
||||
adapter?: Adapter;
|
||||
loading?: string;
|
||||
attempt?: number;
|
||||
preLoad?: number;
|
||||
observer?: boolean;
|
||||
lazyImage?: boolean;
|
||||
throttleWait?: number;
|
||||
listenEvents?: ListenEvent[];
|
||||
dispatchEvent?: boolean;
|
||||
lazyComponent?: boolean;
|
||||
observerOptions?: IntersectionObserverInit;
|
||||
};
|
||||
|
||||
export declare const Lazyload: {
|
||||
install(app: App, options?: LazyloadOptions): void;
|
||||
};
|
||||
|
||||
declare module 'vue' {
|
||||
interface ComponentCustomProperties {
|
||||
$Lazyload: {
|
||||
$on: (event: string, handler: Callback) => void;
|
||||
$off: (event: string, handler?: Callback) => void;
|
||||
$once: (event: string, handler: Callback) => void;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user