Card卡片

  • 形状为矩形。
  • 可包含多种类型的元素,eg:图片、文字、按钮等。

默认

通栏

  1. @Component({
  2. selector: 'demo-card-full',
  3. template: `
  4. <CardHeader
  5. [title]="'This is title'"
  6. [extra]="extra"
  7. [thumb]="'https://gw.alipayobjects.com/zos/rmsportal/MRhHctKOineMbKAZslML.jpg'"
  8. [thumbStyle]="thumbStyle"
  9. >
  10. <ng-template #extra>
  11. <span>this is extra</span>
  12. </ng-template>
  13. </CardHeader>
  14. <div>This is content of Card</div>
  15. </CardBody>
  16. <ng-template #footerExtra>
  17. <div>extra footer content</div>
  18. </ng-template>
  19. </CardFooter>
  20. </Card>
  21. `
  22. })
  23. export class DemoCardFullComponent {
  24. thumbStyle = {
  25. width: '32px',
  26. height: '32px'
  27. };

API