1 | ---
|
2 | title: Tabs
|
3 | preview: https://didi.github.io/mand-mobile/examples/#/tabs
|
4 | ---
|
5 |
|
6 | To create a tab page with a content area
|
7 |
|
8 | ### Import
|
9 |
|
10 | ```javascript
|
11 | import { Tabs, TabPane } from 'mand-mobile'
|
12 |
|
13 | Vue.component(Tabs.name, Tabs)
|
14 | Vue.component(TabPane.name, TabPane)
|
15 | ```
|
16 |
|
17 | ### Code Examples
|
18 |
|
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()
|
38 | relayout tabbar
|
39 |
|
40 | #### Tabs Events
|
41 |
|
42 | ##### @change(tab)
|
43 | when user select tab
|
44 |
|
45 | |Props | Description | Type|
|
46 | |----|-----|------|
|
47 | | tab | object of selected tab | Object:{name: String, label: String, disabled: Boolean}|
|