API
Props
name | type | default | description | required version |
default-src | string | default image src | -- | |
src | string | real image src | -- | |
webp-src | string | real image src in webp format, if current browser supports webp, this image will be loaded | -- | |
error-class | string | a class name will be added to the img element if loading failed | -- | |
success-class | string | a class name will be added to the img element if loading successfully | -- | |
offset | number | 100 | how early you want the elements to be loaded before they’re visible | -- |
container | string | window | If you want to lazy load elements inside a scrolling container change the default value to the selector of the container | -- |
delay | number | 0 | delay execute lazyload function because sometimes transition between routes will cause problems | -- |
separator | string | the separator of image src | -- |
Contributors
Contributors
Total commits quantity: 15,Total contributors quantity: 3
airylandlichunqiangF-loatChangelog
Releases
- v2.9.2 [enhance] Support prop:separator #2744
- v2.6.0 [fix] re-initialize when src is changed #1901
- v2.5.4 [feature] re-init after router-view transition is finished
- v2.1.1-rc.2 [feature] Support prop:delay