Card 卡片

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

示例

卡片包含标题,内容以及操作区域。 Card 组件由 header 和 body 组成。 header 是可选的,其内容取决于一个具名的 slot。

<template>
  <cvue-card>
    <template #headerLeft>标题</template>
    <template #headerRight>其它</template>
    <div>内容</div>
  </cvue-card>
</template>

<script lang="ts" setup></script>

属性

属性名说明类型默认值可选值
header卡片的标题 你既可以通过设置 header 来修改标题,也可以通过 slot#header 传入 DOM 节点string--
body-stylebody 的样式object-{ padding: '20px' }
shadow设置阴影显示时机stringalwaysalways / hover / never

插槽

插槽名说明slotProps
default自定义默认内容-
header卡片标题内容-
上次更新:
贡献者: wishzhang