mirror of
https://github.com/youzan/vant.git
synced 2026-05-18 01:01:06 +08:00
[Doc] add some english documents (#220)
* [bugfix] Checkbox border render error in weixin browser * [bugfix] TreeSelect dependency path error * [bugfix] Swipe should clear autoplay timer when destroyed
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
## NavBar
|
||||
|
||||
### Install
|
||||
``` javascript
|
||||
import { NavBar } from 'vant';
|
||||
|
||||
Vue.component(NavBar.name, NavBar);
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
#### Basic Usage
|
||||
|
||||
:::demo Basic Usage
|
||||
```html
|
||||
<van-nav-bar
|
||||
title="Title"
|
||||
left-text="Back"
|
||||
right-text="Button"
|
||||
left-arrow
|
||||
/>
|
||||
```
|
||||
:::
|
||||
|
||||
#### Advanced Usage
|
||||
|
||||
:::demo Advanced Usage
|
||||
```html
|
||||
<van-nav-bar title="Title" left-text="Back" left-arrow>
|
||||
<van-icon name="search" slot="right" />
|
||||
</van-nav-bar>
|
||||
```
|
||||
:::
|
||||
|
||||
|
||||
### API
|
||||
| Attribute | Description | Type | Default | Accepted Values |
|
||||
|-----------|-----------|-----------|-------------|-------------|
|
||||
| title | Title | `String` | `''` | - |
|
||||
| left-text | Left Text | `String` | `''` | - |
|
||||
| right-text | Right Text | `String` | `''` | - |
|
||||
| left-arrow | Whether to show left arrow | `Boolean` | `false` | - |
|
||||
| fixed | Whether to fixed top | `Boolean` | `false` | - |
|
||||
|
||||
### Slot
|
||||
|
||||
| name | Description |
|
||||
|-----------|-----------|
|
||||
| title | Custom title |
|
||||
| left | Custom left side content |
|
||||
| right | Custom right side content |
|
||||
Reference in New Issue
Block a user