a image loader component for vue2
npm install vue2-image-loader --save-dev
template:
<ImgLoader :defaultImgUrl="'error.png'" :imgUrl="imgurl" />
script:
//import
import ImgLoader from 'vue2-image-loader'
//define
components:{
ImgLoader
}
defaultImgUrl:a default image if the target image can't load
imgUrl:target image to load