Skip to content

Cell 列表项

Cell 列表项打开
9:41
/pages/cell/index

介绍

weui-cell-groupweui-cell 用于展示列表、表单项、入口项等常见结构,视觉上对齐 WeUI 的 cells/cell 体系。

基础用法

vue
<template>
  <weui-cell-group title="带说明的列表项">
    <weui-cell title="标题文字" value="说明文字" />
    <weui-cell title="可点击列表项" value="说明文字" arrow clickable />
  </weui-cell-group>
</template>

插槽用法

vue
<weui-cell arrow clickable>
  <template #left>
    <image class="icon" src="/static/logo.png" />
  </template>
  自定义内容
  <template #right>详情</template>
</weui-cell>

CellGroup Props

属性说明类型默认值
title分组标题string''
tips分组底部提示string''
inset是否使用圆角内嵌样式booleanfalse
variant变体,可选 formcheckboxradiostring''

Cell Props

属性说明类型默认值
title主标题string''
label标题下方描述string''
value右侧内容string''
icon左侧图标地址string''
arrow是否显示进入箭头booleanfalse
clickable是否可点击booleanfalse
border是否显示顶部分割线booleantrue
active是否强制显示点击态 classbooleanfalse
extraClass额外 classstring''

Slots

插槽名说明
defaultCell 主体内容
left左侧区域,推荐使用
right右侧区域,推荐使用
icon左侧图标区域
value右侧值区域
hd兼容旧版左侧插槽
ft兼容旧版右侧插槽

Events

事件名说明回调参数
click点击可点击 Cell 时触发event

Released under the MIT License.