mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-25 19:06:36 +08:00
* fix: Tabbar icon line-height * [new feature] progress add showPivot prop * [new feature] TabItem support vue-router * [new feature] update document header style * [Doc] add toast english ducoment * [new feature] add i18n support * feat: Extract demos from markdown * feat: Base components demos * [new feature] complete demo extract & translate * [fix] text cases * fix: add deepAssign test cases * fix: changelog detail * [new feature] AddressEdit support i18n
47 lines
941 B
Markdown
47 lines
941 B
Markdown
## NavBar
|
|
|
|
### Install
|
|
``` javascript
|
|
import { NavBar } from 'vant';
|
|
|
|
Vue.component(NavBar.name, NavBar);
|
|
```
|
|
|
|
### Usage
|
|
|
|
#### Basic Usage
|
|
|
|
```html
|
|
<van-nav-bar
|
|
title="Title"
|
|
leftText="Back"
|
|
rightText="Button"
|
|
leftArrow
|
|
/>
|
|
```
|
|
|
|
#### Advanced Usage
|
|
|
|
```html
|
|
<van-nav-bar title="Title" leftText="Back" leftArrow>
|
|
<van-icon name="search" slot="right" />
|
|
</van-nav-bar>
|
|
```
|
|
|
|
|
|
### API
|
|
| Attribute | Description | Type | Default | Accepted Values |
|
|
|-----------|-----------|-----------|-------------|-------------|
|
|
| title | Title | `String` | `''` | - |
|
|
| leftText | Left Text | `String` | `''` | - |
|
|
| rightText | Right Text | `String` | `''` | - |
|
|
| leftArrow | 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 | |