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
+28 -1
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() {} | |