更新记录

1.0.0(2024-01-24)

1.0.0


平台兼容性

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

sa-list

引用并注册插件

import saList from '@/uni_modules/sa-list/components/sa-list/sa-list.vue'
components:{
    saList
}

使用插件

<saList :dataList="dataList" @clickCell="clickCell">
    <template slot-scope="{data}=data">
        <text v-if="!!data.text" class="cell-right-text">{{data.text}}</text>
        <image v-else class="cell-right-icon" src="@/static/mine/right_arrow.png"></image>
    </template>
</saList>

数据格式

dataList: [{
        "title": "厂商资料",
        "image": "../../static/mine/mftinfo.png",
        "page": "/pages/mine/supplierInfo",
        "isIcon":false,
        "text":'111'
    },
    {
         "title": "编辑个人资料",
         "image": "../../static/mine/myinfo.png",
         "page": "/pages/mine/userInfoPage",
         "isIcon":false,
    },
    {
         "title": "关于客服",
         "image": "../../static/mine/phone.png",
         "page": "",
         "isIcon":true,
    },
    {
         "title": "修改密码",
         "image": "../../static/mine/password.png",
         "page": "/pages/mine/changePwd/changePwd2",
    },
    {
         "title": "文件管理",
         "image": "../../static/mine/filemanager.png",
         "page": "",
    }
]

ListItem Props

属性名 类型 默认值 说明
dataList Array [] 数据

dataList Options

属性名 类型 默认值 说明
title String -- 标题
image String -- 左侧图片
page String -- 跳转地址
isIcon Boolean true 是否显示左侧图片默认展示
text String -- 右侧展示文字还是图片,text为空或者不存在展示图片,可自定义展示,slot

ListItem Events

事件称名 说明 返回参数
clickCell 点击触发事件 data={xxx:xxx}

ListItem Slots

名称 说明
slot-scope 右侧可自定义内容。

样式(可自定义)

.cell-right-text{
    margin-right: 24rpx;
}
.cell-right-icon {
    margin-right: 24rpx;
    width: 40rpx;
    height: 40rpx;
}

隐私、权限声明

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

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

插件不采集任何数据

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

许可协议

MIT协议

暂无用户评论。

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