# yuImgSwiper 图片轮播
图片轮播组件,图片懒加载
# 效果预览
<template>
<yu-img-swiper :images="images" @userClick="goChangeImg"></yu-img-swiper>
<template>
<script>
import img1 from '@/assets/img/entrance.png'
import yuImgSwiper from '@/components/yu-img-swiper/index.vue';
export default {
components: {
yuImgSwiper
},
data() {
return {
images: [
img1,
img1,
'https://pic4.zhimg.com/80/v2-94a0bc8b2774dc9a4dc9a7a01981d30b_1440w.webp',
'https://pic3.zhimg.com/80/v2-121ad85546ecc7a044558593f30dea8a_1440w.webp'
]
}
},
methods: {
goChangeImg(val) {
console.log('goChangeImg:', val)
}
}
}
</script>
# Attributes
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
images | 图片数组 | Array | - | - |