示例仅供参考,请以真机为主

List 列表

参数

参数说明类型可选值默认值
label标题string
disabled是否禁用booleanfalse
border是否带边框booleantrue
type类型stringprimary / success / error / warning / info
justify水平排序方式stringstart / end / centerstart
swipe是否可滑动stringnone / left / rightnone

插槽

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

示例

基本用法

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

带图标

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

带描述

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

禁用

<cl-list-item label="银行卡" disabled>
	<text>兴业银行(***1113)</text>
</cl-list-item>

滑动

<cl-list-item label="向右滑动" swipe="left">
	<template #menu>
		<cl-button type="primary">置顶</cl-button>
		<cl-button type="error">删除</cl-button>
	</template>
</cl-list-item>

<cl-list-item label="向左滑动" swipe="right">
	<template #menu>
		<cl-button type="primary">置顶</cl-button>
		<cl-button type="error">删除</cl-button>
	</template>
</cl-list-item>

自定义

<cl-list-item justify="start">
	<cl-row type="flex" align="middle">
		<cl-avatar></cl-avatar>
		<cl-text value="神仙都没用" :margin="[0, 0, 0, 10]"></cl-text>
	</cl-row>

	<template #append>
		<cl-button>修改头像</cl-button>
	</template>
</cl-list-item>

按钮组

<cl-card label="按钮组">
	<cl-list>
		<cl-list-item label="A"></cl-list-item>
		<cl-list-item label="B"></cl-list-item>
		<cl-list-item label="C"></cl-list-item>
	</cl-list>
</cl-card>
Last Updated: