更新记录

1.0.0(2024-01-10)

uniappx 自定义可滑动轮播宫格组件,可支持两行和单行,暂时只支持安卓


平台兼容性

Vue2 Vue3
App 快应用 微信小程序 支付宝小程序 百度小程序 字节小程序 QQ小程序
HBuilderX 3.7.0,Android:6.0,iOS:不确定 × × × × × ×
钉钉小程序 快手小程序 飞书小程序 京东小程序
× × × ×
H5-Safari Android Browser 微信浏览器(Android) QQ浏览器(Android) Chrome IE Edge Firefox PC-Safari
× × × × × × × × ×

youlan-nav-swiper

uniappx 自定义可滑动轮播宫格组件,可支持两行和单行,暂时只支持安卓

开发文档

引入组件

// 根据你所在的目录引用
import youlanNavSwiper from '@/uni_modules/youlan-nav-swiper/utssdk/app-android/index.vue';

注册组件

// 具体的使用教程建议下载我提供的完整案例
components: {
    youlanNavSwiper
},

// dataArr 是一个二维数组,用来区分不同的宫格, 下面是模拟数据
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

隐私、权限声明

1. 本插件需要申请的系统权限列表:

2. 本插件采集的数据、发送的服务器地址、以及数据用途说明:

3. 本插件是否包含广告,如包含需详细说明广告表达方式、展示频率:

许可协议

MIT协议

暂无用户评论。

使用中有什么不明白的地方,就向插件作者提问吧~ 我要提问