更新记录

1.0.0(2023-05-03)

完成


平台兼容性

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

List 列表

参数

参数 说明 类型 可选值 默认值
label 标题 string
disabled 是否禁用 boolean false
border 是否带边框 boolean true
type 类型 string primary / success / error / warning / info
justify 水平排序方式 string start / end / center start
swipe 是否可滑动 string none / left / right none

插槽

插槽 说明
icon 左侧图标
append 在元素的结尾插入内容
menu 滑动菜单

示例

基础用法

<ayi-list-item label="账单"></ayi-list-item>

带图标

<ayi-list-item label="神仙">
    <template #icon>
        <image src="/static/avatar.png" class="img" />
    </template>
</ayi-list-item>

带描述

<ayi-list-item label="余额">
    <ayi-text type="price" :size="30" :value="13.14"></ayi-text>
</ayi-list-item>

禁用

<ayi-list-item label="手机号" disabled>
    <text>130****1111</text>
</ayi-list-item>

滑动

<ayi-list-item label="向右滑动" swipe="left">
    <template #menu>
        <ayi-button class="ts" type="primary">置顶</ayi-button>
        <ayi-button class="ts" type="error">删除</ayi-button>
    </template>
</ayi-list-item>
<style lang="scss" scoped>
    .ts {
        :deep(.ayi-button) {
            height: 100rpx !important;
            border-radius: 0 !important;
            margin: 0;
        }
    }
</style>
<ayi-list-item label="向左滑动" swipe="right">
    <template #menu>
        <ayi-button class="ts" type="primary">置顶</ayi-button>
        <ayi-button class="ts" type="error">删除</ayi-button>
    </template>
</ayi-list-item>
<style lang="scss" scoped>
    .ts {
        :deep(.ayi-button) {
            height: 100rpx !important;
            border-radius: 0 !important;
            margin: 0;
        }
    }
</style>

自定义

<ayi-list-item justify="start">
    <ayi-row type="flex" align="middle">
        <ayi-avatar><ayi-icon name="my" :size="40"></ayi-icon></ayi-avatar>
        <ayi-text value="无语" :margin="[0, 0, 0, 10]"></ayi-text>
    </ayi-row>
    <template #append>
        <ayi-button>修改头像</ayi-button>
    </template>
</ayi-list-item>

按钮组

<ayi-list>
    <ayi-list-item label="A"></ayi-list-item>
    <ayi-list-item label="B"></ayi-list-item>
    <ayi-list-item label="C"></ayi-list-item>
</ayi-list>

隐私、权限声明

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

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

插件不采集任何数据

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

许可协议

MIT协议

暂无用户评论。

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