Skip to content

Commit

Permalink
release version v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
linxz committed Nov 11, 2020
1 parent 0f4a118 commit 93666af
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 7 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## 1.2.0
`2020-11-12`
* **Feature**
* loading、avatar 样式更新;
* container 组件增加 title 属性功能;
* amount-input 新增金额长度标识;
* **Fixed**
* badge 中使用 slot 时箭头位置优化;
* 组件初始情况 rpx 模式 icon size 过小;
* notice 组件偶现无法滚动([#48](https://github.com/Alibaba-mp/mini-ali-ui/pull/48));
* 处理 searchBar 组件的闪动现象;
* list 组件 worker render 的报错;
* Terms checkbox 默认选中不生效([#56](https://github.com/Alibaba-mp/mini-ali-ui/pull/56));
* 部分组件的样式细节优化调整;
* **Chore**
* 添加 babel/runtime;

## 1.1.7
`2020-10-15`
* **Fixed**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mini-ali-ui",
"version": "1.1.7",
"version": "1.2.0",
"description": "小程序版AntUI",
"repository": {
"type": "git",
Expand Down
78 changes: 72 additions & 6 deletions src/container/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@


## 属性介绍
| 属性名 | 类型 | 默认值 | 可选值 | 描述 | 必填 |
| ---- | ---- | ---- | ---- | ---- | ---- |
| className | String | - | - | 自定义样式名 | - |
| type | String | line | line, onewithtwo | 容器排版类型 | - |
| 属性名 | 类型 | 默认值 | 可选值 | 描述 | 必填 | 最低版本 |
| ---- | ---- | ---- | ---- | ---- | ---- | ---- |
| className | String | - | - | 自定义样式名 | - | - |
| type | String | line | line, onewithtwo | 容器排版类型 | - | - |
| title | String | '' | - | 当不为空时可展示 **title** 组件 | - | [1.2.0](https://www.npmjs.com/package/mini-ali-ui?activeTab=versions) |
| thumb | String | '' | - | 标题区域的 icon URL | - | [1.2.0](https://www.npmjs.com/package/mini-ali-ui?activeTab=versions) |
| icon | String | '' | arrow、close、more | 标题区域右侧的 icon 图标 | - | [1.2.0](https://www.npmjs.com/package/mini-ali-ui?activeTab=versions) |
| onActionTap | EventHandle | () => {} | - | 标题区域右侧可点击事件 | - | [1.2.0](https://www.npmjs.com/package/mini-ali-ui?activeTab=versions) |

## tips
type 为 line 时会等分所有子元素。
* type 为 line 时会等分所有子元素;
*`icon` 的值为空时,可添加 `slot="operation"` 元素展示在标题的右侧区域;
* 如使用 `title` 属性后,就不需要再在 json 中引入 **title** 组件;

## 示例

Expand All @@ -34,6 +40,52 @@ type 为 line 时会等分所有子元素。
```

```xml
<view className="container">
<container className="container-item"
title="带有 title 标题,可自定义设置"
thumb="https://img.alicdn.com/tfs/TB1Go8lh9R26e4jSZFEXXbwuXXa-84-84.png"
onActionTap="titleClick"
>
<view slot="operation" style="color: red;">is slot</view>
<view class="item">container 组件自带的 title 属性值效果。icon 无值或者为空时,可插入一个名为 operation 的 slot 元素。</view>
</container>

<container className="container-item"
title="带有 title 标题,箭头"
icon="arrow"
thumb="https://img.alicdn.com/tfs/TB1Q19sTNv1gK0jSZFFXXb0sXXa-112-112.png"
onActionTap="titleClick"
>
<view class="item">container 组件自带的 title 属性值效果</view>
</container>

<container className="container-item"
title="带有 title 标题,关闭"
icon="close"
thumb="https://img.alicdn.com/tfs/TB1Go8lh9R26e4jSZFEXXbwuXXa-84-84.png"
onActionTap="titleClick"
>
<view class="item">container 组件自带的 title 属性值效果</view>
</container>

<container className="container-item"
title="带有 title 标题,更多"
icon="more"
thumb="https://img.alicdn.com/tfs/TB1Q19sTNv1gK0jSZFFXXb0sXXa-112-112.png"
onActionTap="titleClick"
>
<view class="item">container 组件自带的 title 属性值效果</view>
</container>

<container className="container-item"
title="带有 title 标题,无"
thumb="https://img.alicdn.com/tfs/TB1Go8lh9R26e4jSZFEXXbwuXXa-84-84.png"
onActionTap="titleClick"
>
<view class="item">container 组件自带的 title 属性值效果</view>
</container>
</view>

<view className="container">
<container className="container-item">
<view class="item">a1</view>
Expand Down Expand Up @@ -66,6 +118,20 @@ type 为 line 时会等分所有子元素。
</container>
</view>
```

```javascript
Page({
data: {},
onLoad() {},
titleClick() {
my.alert({
title: 'onActionTap 回调',
content: '标题后面操作区域点击',
});
},
});
```

```css
.container {
background: #F5F5F5;
Expand All @@ -86,11 +152,11 @@ type 为 line 时会等分所有子元素。
background: #eeeeee;
text-align: center;
height: 200rpx;
padding-top: 20rpx;
}

.grid-item {
background: #eeeeee;
text-align: center;
}

```

0 comments on commit 93666af

Please sign in to comment.