Card

Card.

Attribute NameDescriptionTypeDefaultMandatory
thumbCard thumbnail addressStringfalse
titleCard titleStringtrue
subTitleCard subtitleStringfalse
footerFooter textStringfalse
footerImgFooter image addressStringfalse
onCardClickCallback when the card is clicked(info: Object) => voidfalse
infoUsed to transfer data to the outside   when the card is clickedStringfalse

Example

copy
{
  "defaultTitle": "AntUI Component Library",
  "usingComponents": {
    "card": "mini-antui/es/card/index"
  }
}
copy
<card
  thumb="{{thumb}}"
  title="Card Title"
  subTitle="Subtitle is not required"
  onClick="onCardClick"
  footer="Description"
  footerImg="{{footerImg}}"
  info="Click the card"
/>
copy
Page({
    data: {
        thumb: 'https://img.example.com/example.png',
        footerImg: 'https://img.example.com/example.png',
    },
    onCardClick: function(ev) {
        my.showToast({
            content: ev.info,
        });
    }
});