[Doc] new theme

This commit is contained in:
陈嘉涵
2019-05-15 20:53:04 +08:00
parent 3cae4288f2
commit d0f4169c86
130 changed files with 1460 additions and 1147 deletions
+10 -5
View File
@@ -1,15 +1,16 @@
## Search
# Search
### Install
``` javascript
import { Search } from 'vant';
Vue.use(Search);
```
### Usage
## Usage
#### Basic Usage
### Basic Usage
```html
<van-search placeholder="Placeholder" v-model="value" />
@@ -23,7 +24,8 @@ export default {
}
```
#### Listen to Events
### Listen to Events
`search` event will be triggered when click the search button on the keyboard.
`cancel` event will be triggered when click the cancel button.
@@ -42,7 +44,8 @@ Tips: There will be a search button on the keyboard when Search is inside a form
</form>
```
#### Custom Button
### Custom Button
Use `action` slot to custom right button, `cancel` event will no longer be triggered when use this slot
```html
@@ -56,6 +59,8 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg
</van-search>
```
## API
### Props
Search support all native properties of input tagsuch as `maxlength`、`placeholder`、`autofocus`