mirror of
https://github.com/youzan/vant.git
synced 2025-12-24 02:02:09 +08:00
done
This commit is contained in:
@@ -1,21 +1,12 @@
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
goSearch(value) {
|
||||
alert(value)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
## Search 组件
|
||||
|
||||
### 基础用法
|
||||
|
||||
:::demo 样例代码
|
||||
|
||||
```html
|
||||
<zan-search
|
||||
placeholder="商品名称"
|
||||
:on-search="goSearch"
|
||||
@search="goSearch"
|
||||
>
|
||||
</zan-search>
|
||||
```
|
||||
@@ -29,11 +20,9 @@ export default {
|
||||
}
|
||||
};
|
||||
```
|
||||
:::
|
||||
|
||||
### API
|
||||
|
||||
| 参数 | 说明 | 类型 | 默认值 | 必须 |
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| placeholder | input的placeholder文案 | string | | required |
|
||||
| on-search | 点击回车后出发搜索回调 | function | function() {} | |
|
||||
| placeholder | input的placeholder文案 | string | | |
|
||||
Reference in New Issue
Block a user