docs(Search): Search demo desc adjustment (#5603)
This commit is contained in:
@@ -19,6 +19,25 @@ v-model 用于控制搜索框中的文字,background 可以自定义搜索框
|
||||
<van-search placeholder="请输入搜索关键词" v-model="value" />
|
||||
```
|
||||
|
||||
### 自定义背景色
|
||||
|
||||
```html
|
||||
<van-search placeholder="Placeholder" v-model="value" background="#c8c9cc"/>
|
||||
```
|
||||
|
||||
### 禁用搜索框
|
||||
|
||||
```html
|
||||
<van-search placeholder="请输入搜索关键词" v-model="value" disabled/>
|
||||
```
|
||||
|
||||
### 搜索框内容对齐
|
||||
通过 `input-align` 属性可以设置搜索框内容的对齐方式
|
||||
|
||||
```html
|
||||
<van-search placeholder="Placeholder" v-model="value" input-align="center"/>
|
||||
```
|
||||
|
||||
### 事件监听
|
||||
|
||||
Search 组件提供了`search`和`cancel`事件,`search`事件在点击键盘上的搜索/回车按钮后触发,`cancel`事件在点击搜索框右侧取消按钮时触发
|
||||
|
||||
Reference in New Issue
Block a user