This section describes the card component.
Property | Description | Type | Default value | Mandatory |
---|---|---|---|---|
thumb | Card thumbnail address | String | - | false |
title | Card title | String | - | true |
subTitle | Card subtitle | String | - | false |
footer | Text of the footer. | String | - | false |
footerImg | Address of the footer image. | String | - | false |
onCardClick | Callback when a card is tapped. | (info: Object) => void | - | false |
info | Used to send data out when the card is tapped. | String | - | false |
Sample code
{
"defaultTitle": "AntUI component library of the Mini Program",
"usingComponents": {
"card": "mini-ali-ui/es/card/index"
}
}
<card
thumb="{{thumb}}"
title="Title"
subTitle="Subtitle is optional"
onCardClick="onCardClick"
footer="Description"
footerImg="{{footerImg}}"
info="Tap card"
/>
Page({
data: {
tagData: [
{ date: '2018-05-14', tag: 'Pay mortgage', tagColor: 5 },
{ date: '2018-05-28', tag: 'Housing provident fund', tagColor: 2 },
],
},
handleSelect() {},
onMonthChange() {},
});