XImg
Install

Install


API

Props

nametypedefaultdescriptionrequired version
default-srcstringdefault image src--
srcstringreal image src--
webp-srcstringreal image src in webp format, if current browser supports webp, this image will be loaded--
error-classstringa class name will be added to the img element if loading failed--
success-classstringa class name will be added to the img element if loading successfully--
offsetnumber100how early you want the elements to be loaded before they’re visible--
containerstringwindowIf you want to lazy load elements inside a scrolling container change the default value to the selector of the container--
delaynumber0delay execute lazyload function because sometimes transition between routes will cause problems--
separatorstringthe separator of image src--


Contributors

Contributors

Total commits quantity: 15,Total contributors quantity: 3

airylandlichunqiangF-loat

Changelog

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