Skip to content

Card 卡片 ​

卡片,标题、副标题、边框、阴影与点击态,提供页头 / 内容区 / 页尾三个插槽。

平台支持 ​

Web微信小程序AndroidiOSHarmonyOS
5.385.385.385.385.38
Card 卡片
加载中…

基础用法 ​

html
<vapor-card title="标题" :border="true">
	自定义内容
</vapor-card>

自定义页头 / 页尾 ​

html
<vapor-card title="标题">
	<template #header>
		<text>自定义页头</text>
	</template>
	<template #footer>
		<text>自定义页尾</text>
	</template>
</vapor-card>

属性 ​

属性类型默认值说明
titlestring''卡片标题
subtitlestring''卡片副标题
borderbooleantrue是否显示边框
shadowbooleanfalse是否展示阴影
hoverbooleanfalse是否可点击(触发点击态并派发 click)
customClassstring''卡片根节点样式类
customTitleClassstring''标题样式类
customSubtitleClassstring''副标题样式类
customBodyClassstring''内容区样式类
hoverStayTimenumber100松开后点击态保留时间(毫秒)

事件 ​

事件说明参数
click点击卡片,仅在 hover 为 true 时派发UniPointerEvent

插槽 ​

  • default(内容区,作用域 props:title / subtitle)
  • header(页头,作用域 props:title / subtitle)
  • footer(页尾,作用域 props:title)