移动开发平台 mPaaS 卡片(card)

By | 2021年4月23日

本文介绍卡片(card)。

属性名 类型 默认值 描述 必选
thumb String Card 缩略图地址。 false
title String Card 标题。 true
subTitle String Card 副标题。 false
footer String footer 文字。 false
footerImg String footer 图片地址。 false
onCardClick (info: Object) => void Card 点击的回调。 false
info String 用于点击卡片时往外传递数据。 false

代码示例

  
  1. {
  2. "defaultTitle": "小程序AntUI组件库",
  3. "usingComponents": {
  4. "card": "mini-ali-ui/es/card/index"
  5. }
  6. }
  
  1. <card
  2. thumb="{{thumb}}"
  3. title="卡片标题"
  4. subTitle="副标题非必填"
  5. onCardClick="onCardClick"
  6. footer="描述文字"
  7. footerImg="{{footerImg}}"
  8. info="点击了 card"
  9. />
  
  1. Page({
  2. data: {
  3. tagData: [
  4. { date: '2018-05-14', tag: '还房贷', tagColor: 5 },
  5. { date: '2018-05-28', tag: '公积金', tagColor: 2 },
  6. ],
  7. },
  8. handleSelect() {},
  9. onMonthChange() {},
  10. });

请关注公众号获取更多资料

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注