This commit is contained in:
zhuxiang
2017-03-01 14:51:27 +08:00
parent 0abb184056
commit 6808b06372
4 changed files with 52 additions and 7 deletions

View File

@@ -15,13 +15,13 @@
### z-badge-group API
| 参数 | 说明 | 类型 | 默认值 | 必须 |
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|-----------|-----------|-----------|-------------|-------------|
| active-key | 激活的badge的索引 | string | '0'但必须子badge里的mark是有0位索引 | |
### z-badge API
| 参数 | 说明 | 类型 | 默认值 | 可选值 |
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|-----------|-----------|-----------|-------------|-------------|
| mark | badge的唯一key值 | string | '' | required |
| title | badge的文案标题 | string | '' | required |

View File

@@ -1,3 +1,12 @@
<script>
export default {
methods: {
goSearch(value) {
alert(value)
}
}
};
</script>
## Search 组件
### 基础用法
@@ -6,7 +15,25 @@
```html
<z-search
placeholder="商品名称"
:on-search="goSearch"
>
</z-search>
```
:::
```javascript
export default {
methods: {
goSearch(value) {
alert(value)
}
}
};
```
:::
### API
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|-----------|-----------|-----------|-------------|-------------|
| placeholder | input的placeholder文案 | string | | required |
| on-search | 点击回车后出发搜索回调 | function | function() {} | |