mirror of
https://github.com/youzan/vant.git
synced 2025-10-24 11:10:44 +00: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
941 B
941 B
NavBar
Install
import { NavBar } from 'vant';
Vue.component(NavBar.name, NavBar);
Usage
Basic Usage
<van-nav-bar
title="Title"
leftText="Back"
rightText="Button"
leftArrow
/>
Advanced Usage
<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 |