Skip to content

Commit a493a8f

Browse files
committed
inputItem Notice 以及 modal 组件的文档说明优化
1 parent d7520a8 commit a493a8f

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
## 0.4.31
2+
3+
`2019-08-28`
4+
25
- **Bug Fix**
36
- package.json 调整
47

components/input-item/index.md

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
## InputItem 文本输入
2-
31
文本输入。
42

5-
扫码体验:
6-
3+
## 扫码体验
74
<img src="https://gw.alipayobjects.com/zos/rmsportal/HoUOLnPEOaymuHlbeyqR.jpeg" width="154" height="190" />
85

6+
## 效果示例
7+
![输入框.png](https://intranetproxy.alipay.com/skylark/lark/0/2019/png/188518/1564389321807-3fdc73ec-f8c4-454b-aa2b-69121edd0d25.png)
8+
9+
## 属性
910
| 属性名 | 描述 | 类型 | 默认值 |
1011
| ---- |----|----|----|
1112
| className | 自定义的class | String| '' |
@@ -14,7 +15,7 @@
1415
| last | 是否最后一行 | Boolean | false |
1516
| value | 初始内容 | String | '' |
1617
| name | 组件名字,用于表单提交获取数据 | String | '' |
17-
| type | input 的类型,有效值:`text`, `number`, `idcard`, `digit` | String | text |
18+
| type | input 的类型,有效值:`text`, `number`, `idcard`, `digit` | String | text |
1819
| password | 是否是密码类型 | Boolean | false |
1920
| placeholder | 占位符 | String | '' |
2021
| placeholderStyle | 指定 placeholder 的样式 | String | '' |
@@ -29,15 +30,24 @@
2930
| onBlur | 失去焦点时触发 | (e: Object) => void | |
3031
| onClear | 点击清除icon时触发 | () => void | |
3132

33+
### type 属性值介绍
34+
* `text`: 字符输入框
35+
* `number`: 纯数字输入框( 0-9 之间的数字)
36+
* `idcard`:身份证输入框( 0-9 之间的数字,以及字符 x)
37+
* `digit`:数字输入框,( 0-9 之间的数字,以及小数点 . 字符,可用于含有小数的数字)
38+
39+
****`type` 的属性值影响的是真机中的键盘类型,在模拟器中并不一定会有效果。
40+
3241
## slots
3342

3443
| slotname | 说明 |
3544
| ---- | ---- |
3645
| extra | 可选,用于渲染input-item项右边说明 |
3746

38-
## 示例
47+
## 示例代码
3948

4049
```json
50+
// API-DEMO page/component/input-item/input-item.json
4151
{
4252
"defaultTitle": "小程序AntUI组件库",
4353
"usingComponents": {
@@ -49,7 +59,8 @@
4959
}
5060
```
5161

52-
```axml
62+
```html
63+
<!-- API-DEMO page/component/input-item/input-item.axml -->
5364
<view>
5465
<view style="margin-top: 10px;" />
5566
<list>
@@ -108,6 +119,7 @@
108119
```
109120

110121
```javascript
122+
// API-DEMO page/component/input-item/input-item.js
111123
const banks = ['网商银行', '建设银行', '工商银行', '浦发银行'];
112124

113125
Page({
@@ -159,6 +171,7 @@ Page({
159171
```
160172

161173
```css
174+
/* API-DEMO page/component/input-item/input-item.acss */
162175
.extra {
163176
background-image: url('https://gw.alipayobjects.com/zos/rmsportal/dOfSJfWQvYdvsZiJStvg.svg');
164177
background-size: contain;
@@ -169,4 +182,4 @@ Page({
169182
width: 20px;
170183
padding-left: 10px;
171184
}
172-
```
185+
```

components/modal/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
| topImage | 顶部图片 | String | |
1818
| topImageSize | 顶部图片规则,可选值:`lg``md``sm` | String | md |
1919
| advice| 是否是运营类弹窗 | Boolean | false |
20-
| disableScroll | modal展示时是否禁止页面滚动 | Boolean | true | false |
20+
| disableScroll | modal展示时是否禁止页面滚动**以真机效果为准** | Boolean | true | false |
2121

2222
## slots
2323

components/notice/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
<view class="demo-item">
3333
<notice>因全国公民身份系统升级,添加银行卡银行卡银行卡银行卡</notice>
3434
</view>
35+
<view class="demo-item">
36+
<notice enableMarquee="{{true}}" marqueeProps="{{loop: true, leading: 500, trailing: 800, fps: 40 }}">因全国公民身份系统升级,添加银行卡银行卡银行卡银行卡</notice>
37+
</view>
3538
<view class="demo-item">
3639
<notice mode="link" onClick="linkClick">因全国公民身份系统升级,添加银行卡银行卡银行卡银行卡</notice>
3740
</view>

0 commit comments

Comments
 (0)