Card

Card.

PropertyDescriptionType

Required

thumbCard thumbnail address.String

No

title Card title.String

Yes

subTitleCard subtitle.String

No

footerFooter text.String

No

footerImgFooter image address.String

No

onCardClickCallback when the card is clicked.(info: Object) => void

No

infoUsed to transfer data to the outside when the card is clicked.String

No

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,
		});
	}
});