Skip to content

Cell 单元格 ​

单元格,标题、内容值、说明文字、跳转箭头与点击态,提供标题 / 说明 / 内容值三个具名插槽。

平台支持 ​

Web微信小程序AndroidiOSHarmonyOS
5.385.385.385.385.38
Cell 单元格
加载中…

基础用法 ​

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>

属性 ​

属性类型默认值说明
titlestring''左侧标题
valuestring''右侧内容值
labelstring''标题下方的说明文字
isLinkbooleanfalse是否展示右侧箭头
hoverbooleanfalse是否可点击(触发点击态并派发 click)
customClassstring''单元格根节点样式类
customLeftClassstring''左侧区域样式类
customRightClassstring''右侧区域样式类
customTitleClassstring''标题样式类
customValueClassstring''内容值样式类
customLabelClassstring''说明文字样式类
hoverStayTimenumber100松开后点击态保留时间(毫秒)

事件 ​

事件说明参数
click点击单元格,仅在 hover 为 true 时派发UniPointerEvent

插槽 ​

  • title(标题,作用域 props:title)
  • label(说明文字,作用域 props:label)
  • value(内容值,作用域 props:value)

右侧箭头默认色取 $vapor-text-secondary(对白 4.96:1),可用 --vapor-cell-arrow-color 覆盖。