更新记录
1.0.4(2023-06-15) 下载此版本
增加预览二维码
1.0.3(2023-04-14) 下载此版本
增加示例
1.0.2(2023-04-11) 下载此版本
增加示例图片
查看更多平台兼容性
uni-app
Vue2 | Vue3 | Chrome | Safari | app-vue | app-nvue | Android | iOS | 鸿蒙 |
---|---|---|---|---|---|---|---|---|
√ | - | √ | √ | - | - | - | - | - |
微信小程序 | 支付宝小程序 | 抖音小程序 | 百度小程序 | 快手小程序 | 京东小程序 | 鸿蒙元服务 | QQ小程序 | 飞书小程序 | 快应用-华为 | 快应用-联盟 |
---|---|---|---|---|---|---|---|---|---|---|
√ | - | - | - | - | - | - | - | - | - | - |
liu-customize-swiper适用于uni-app项目的轮播图展示
本组件目前兼容微信小程序、H5
本组件常用于轮播展示,支持点击事件,支持自定义,代码清晰,逻辑全,非常适合新手学习或自由DIY
--- 扫码预览、关注我们 ---
扫码关注公众号,查看更多插件信息,预览插件效果!
使用方式
<liu-customize-swiper title="插画作品" BgPic="https://cdn.pixabay.com/photo/2020/09/05/19/38/landscape-5547401_1280.png" :swiperList="swiperList" @change="checkPic" @checked="checkId"></liu-customize-swiper>
export default {
data() {
return {
swiperList:[
{
picUrl:'https://cdn.pixabay.com/photo/2020/05/19/13/32/cartoon-5190837_1280.jpg',
title:'思考'
},{
picUrl:'https://cdn.pixabay.com/photo/2020/05/19/13/35/cartoon-5190860_1280.jpg',
title:'雨天'
},{
picUrl:'https://cdn.pixabay.com/photo/2021/07/22/11/25/rabbit-6485072_1280.jpg',
title:'兔子'
},{
picUrl:'https://cdn.pixabay.com/photo/2022/03/31/14/53/camp-7103189_1280.png',
title:'日落'
},{
picUrl:'https://cdn.pixabay.com/photo/2022/11/29/19/05/boho-7625140_1280.jpg',
title:'植物'
},{
picUrl:'https://cdn.pixabay.com/photo/2022/08/25/23/06/woman-7411414_1280.png',
title:'时尚'
},{
picUrl:'https://cdn.pixabay.com/photo/2023/03/07/12/45/child-7835677_1280.jpg',
title:'生活'
}
]
};
},
methods: {
//图片点击事件
checkPic(e){
console.log(e, '点击了');
},
//当前图片下标
checkId(e){
console.log(e, '当前ID是');
},
}
}
属性说明
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
swiperList | Array | [] | 图片数据 |
title | String | 标题 | |
BgPic | String | 背景图 | |
@change | Function | 点击图片回调事件 | |
@checked | Function | 当前显示的图片信息回调事件 |