mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
docs(Search): missing value in basic usage
This commit is contained in:
parent
386956b08b
commit
4a047a8af3
@ -20,7 +20,9 @@ Vue.use(Search);
|
||||
```js
|
||||
export default {
|
||||
data() {
|
||||
value: '';
|
||||
return {
|
||||
value: '',
|
||||
};
|
||||
},
|
||||
};
|
||||
```
|
||||
|
@ -23,6 +23,16 @@ Vue.use(Search);
|
||||
<van-search v-model="value" placeholder="请输入搜索关键词" />
|
||||
```
|
||||
|
||||
```js
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: '',
|
||||
};
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### 事件监听
|
||||
|
||||
Search 组件提供了 `search` 和 `cancel` 事件,`search` 事件在点击键盘上的搜索/回车按钮后触发,`cancel` 事件在点击搜索框右侧取消按钮时触发。
|
||||
|
Loading…
x
Reference in New Issue
Block a user