12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- 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/runtime-core' {
- interface ComponentCustomProperties {
- $Lazyload: {
- $on: (event: string, handler: Callback) => void;
- $off: (event: string, handler?: Callback) => void;
- $once: (event: string, handler: Callback) => void;
- };
- }
- }
|