Merge branch '2.x' into dev

This commit is contained in:
chenjiahan
2020-10-25 09:15:20 +08:00
6 changed files with 25 additions and 9 deletions
+3 -1
View File
@@ -21,7 +21,9 @@ app.use(Search);
```js
export default {
data() {
value: '';
return {
value: '',
};
},
};
```
+10
View File
@@ -24,6 +24,16 @@ app.use(Search);
<van-search v-model="value" placeholder="请输入搜索关键词" />
```
```js
export default {
data() {
return {
value: '',
};
},
};
```
### 事件监听
Search 组件提供了 `search``cancel` 事件,`search` 事件在点击键盘上的搜索/回车按钮后触发,`cancel` 事件在点击搜索框右侧取消按钮时触发。