在页面的 `page.json` 中配置：

```json
{
  "usingComponents": {
    "card": "@ubrorg/card/lib/index"
  }
}
```

在页面的 `page.axml` 中使用：

```axml
<view class="card-wrapper" a:for="{{items}}">
    <card
      title="abc"
      index="{{index}}"
      onLikeTap="handleLikeTap"
      dataItem="{{item}}"
    >
    </card>
  </view>
```

### option参数
可直接传dataItem="{{item}}"  也可使用具体属性去覆盖data里的属性值

| 属性 | 类型 | 默认值 | 解释 |
|:--|:--|:--|:--|
| `type` | string | `large` | 卡片类型 |
| `backgroupImgUrl` | string | `null` | 头图 |
| `projectName` | string | `''` | 卡片名称 |
| `description` | string | `''` | 描述 |
| `extra` | string | `''` | 附加描述 |
| `projectTag` | string | `''` | 图标 |
| `favoriteStatus` | boolean | `false` | 是否喜欢 |
| `showLike` | boolean | `true` | 是否展示喜欢图标 |
| `index` | string | `null` | 列表索引 |
| `cardTagName` | string | `null` | 标签 |
| `projectTypeName` | string | `''` | 分类类型 |
| `hotSort` | boolean | `false` | 是否显示热搜排序角标 |


* `type` 可选值

  - large    大卡
  - small    小片
  - scenic   景区卡片
  - goods    1:1卡片
  - search   搜索卡片
  - special  一排一卡片
  - live     直播卡片
  - landreserve  景区预约卡片

* `icon` 及 `tagType` 可选值

  - activity
  - quick
  - hot
  - hotel


## 开发

1. `yarn` 安装依赖
2. 小程序 IDE 打开组件（[下载地址](https://opendocs.alipay.com/mini/ide/download)）

## 更多命令

* `miapp newbranch`: 新建分支
* `miapp push`: 提交代码
* `miapp prepub`: 预发（发布 beta 版本）
* `miapp publish`: 正式发布
