Card 卡片 ​

将信息聚合在卡片容器中展示。

基础用法 ​

卡片包含标题、内容与操作区。

卡片由 header、body、footer 组成;header 与 footer 可选,内容通过具名插槽分布。

Card name

List item 1

List item 2

List item 3

List item 4

简单卡片 ​

可省略头部区域。

List item 1

List item 2

List item 3

List item 4

带图片 ​

通过配置展示更丰富的内容。

body-style 用于设置 body 区域的 CSS 样式。

Yummy hamburger

阴影 ​

可控制阴影出现时机。

shadow 决定阴影展示策略,可选 always、hover、never。

Always
Hover
Never

卡片 API ​

卡片 属性 ​

名称说明类型默认值
header标题;也可通过 slot#header 传入 DOMstring—
footer页脚;也可通过 slot#footer 传入 DOMstring—
body-style内容区样式object—
header-class头部自定义类名string—
body-class内容区自定义类名string—
footer-class页脚自定义类名string—
shadow阴影展示时机enumalways

卡片 插槽 ​

名称说明
default自定义默认内容
header头部内容
footer页脚内容