Cell 单元格
单元格,标题、内容值、说明文字、跳转箭头与点击态,提供标题 / 说明 / 内容值三个具名插槽。
平台支持
| Web | 微信小程序 | Android | iOS | HarmonyOS |
|---|---|---|---|---|
| 5.38 | 5.38 | 5.38 | 5.38 | 5.38 |
加载中…
基础用法
html
<vapor-cell title="单元格" value="内容值" :is-link="true"></vapor-cell>自定义标题与内容
html
<vapor-cell title="标题" value="内容值" :is-link="true">
<template #title>
<text>自定义标题</text>
</template>
<template #value>
<text>自定义内容</text>
</template>
</vapor-cell>属性
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
title | string | '' | 左侧标题 |
value | string | '' | 右侧内容值 |
label | string | '' | 标题下方的说明文字 |
isLink | boolean | false | 是否展示右侧箭头 |
hover | boolean | false | 是否可点击(触发点击态并派发 click) |
customClass | string | '' | 单元格根节点样式类 |
customLeftClass | string | '' | 左侧区域样式类 |
customRightClass | string | '' | 右侧区域样式类 |
customTitleClass | string | '' | 标题样式类 |
customValueClass | string | '' | 内容值样式类 |
customLabelClass | string | '' | 说明文字样式类 |
hoverStayTime | number | 100 | 松开后点击态保留时间(毫秒) |
事件
| 事件 | 说明 | 参数 |
|---|---|---|
click | 点击单元格,仅在 hover 为 true 时派发 | UniPointerEvent |
插槽
title(标题,作用域 props:title)label(说明文字,作用域 props:label)value(内容值,作用域 props:value)
右侧箭头默认色取 $vapor-text-secondary(对白 4.96:1),可用 --vapor-cell-arrow-color 覆盖。