UNPKG

1.01 kBMarkdownView Raw
1---
2title: Tabs
3preview: https://didi.github.io/mand-mobile/examples/#/tabs
4---
5
6To create a tab page with a content area
7
8### Import
9
10```javascript
11import { Tabs, TabPane } from 'mand-mobile'
12
13Vue.component(Tabs.name, Tabs)
14Vue.component(TabPane.name, TabPane)
15```
16
17### Code Examples
18<!-- DEMO -->
19
20### API
21
22#### Tabs Props
23|Props | Description | Type | Default | Note|
24|----|-----|------|------|------|
25|v-model|name of selected tab|String|-|-|
26|immediate|trigger a `change` event immediately after initialization|Boolean|`false`|-|
27
28#### TabPane Props
29|Props | Description | Type | Default | Note|
30|----|-----|------|------|------|
31|name|unique name|String|-|required|
32|label|tab label|String|-|required|
33|disabled|disable pane|Boolean|`false`|-|
34
35#### Tabs Methods
36
37##### reflowTabBar()
38relayout tabbar
39
40#### Tabs Events
41
42##### @change(tab)
43when user select tab
44
45|Props | Description | Type|
46|----|-----|------|
47| tab | object of selected tab | Object:{name: String, label: String, disabled: Boolean}|