更新记录
1.0.0(2024-01-10)
下载此版本
uniappx 自定义可滑动轮播宫格组件,可支持两行和单行,暂时只支持安卓
平台兼容性
uni-app
Vue2 |
Vue3 |
Chrome |
Safari |
app-vue |
app-nvue |
Android |
iOS |
鸿蒙 |
√ |
√ |
- |
- |
- |
- |
6.0 |
- |
- |
微信小程序 |
支付宝小程序 |
抖音小程序 |
百度小程序 |
快手小程序 |
京东小程序 |
鸿蒙元服务 |
QQ小程序 |
飞书小程序 |
快应用-华为 |
快应用-联盟 |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
- |
uni-app x
Chrome |
Safari |
Android |
iOS |
鸿蒙 |
微信小程序 |
- |
- |
6.0 |
- |
- |
- |
youlan-nav-swiper
uniappx 自定义可滑动轮播宫格组件,可支持两行和单行,暂时只支持安卓
开发文档
引入组件
复制代码
import youlanNavSwiper from '@/uni_modules/youlan-nav-swiper/utssdk/app-android/index.vue';
注册组件
复制代码
components: {
youlanNavSwiper
},
dataArr: [
[
{
"imgSrc": '/static/iconfont.png',
"text": "健康药房",
"imgSize": '60rpx',
"fontSize": '24rpx',
id: 1
},
{
"imgSrc": '/static/iconfont.png',
"text": "健康药房",
"imgSize": '60rpx',
"fontSize": '24rpx',
id: 2
},
{
"imgSrc": '/static/iconfont.png',
"text": "健康药房",
"imgSize": '60rpx',
"fontSize": '24rpx',
id: 3
},
{
"imgSrc": '/static/iconfont.png',
"text": "健康药房",
"imgSize": '60rpx',
"fontSize": '24rpx',
id: 4
},
],
[
{
"imgSrc": '/static/iconfont.png',
"text": "健康药房",
"imgSize": '60rpx',
"fontSize": '24rpx',
id: 5
},
{
"imgSrc": '/static/iconfont.png',
"text": "健康药房",
"imgSize": '60rpx',
"fontSize": '24rpx',
id: 6
},
]
]
使用方式
复制代码<youlanNavSwiper
:indicatorColor="option.indicatorColor"
:indicatorColorActive="option.indicatorColorActive"
:lineSum="5"
:multiLine="option.multiLine"
:indicatorDots="option.indicatorDots"
:dataArr="dataArr"
@submit="submit"
/>
属性说明
名称 |
类型 |
是否必填 |
默认值 |
可选值 |
说明 |
dataArr |
Array |
是 |
[] |
[] |
显示的数据 |
multiLine |
Boolean |
否 |
false |
false/true |
是否显示两行, 在一行能显示下的情况下不建议开两行 |
indicatorDots |
Boolean |
否 |
Boolean |
false/true |
是否显示面板指示点 |
lineSum |
Number |
否 |
4 |
Number |
每一行显示的数量 |
lineSum |
String |
否 |
#eee |
rgb/16进制 |
指示点颜色 |
lineSum |
String |
否 |
orange |
rgb/16进制 |
当前选中的指示点颜色 |
方法说明
名称 |
说明 |
回调参数 |
submit |
用户点击item |
返回你点击的item |