引入

  1. {
  2. "usingComponents": {
  3. "x-card": "waft-ui/assembly/card/card"
  4. }
  5. }

代码示例

  1. <x-card title="标题" width="200rpx"></x-card>

screenshot.png

API

  • props | 参数 | 说明 | 类型 | 默认值 | | —- | —- | —- | —- | | title | 卡片标题 | string | | | titleAlign | 标题对齐方式,支持center,left,right | string | center | | noBorder | 有无边界 | boolean | false | | width | 宽度(需带单位) | string | | | height | 高度(需带单位) | string | | | bgColor | 卡片背景色 | string | |