mand-mobile/components/tabs
xuxiaoyan 9b365ddb74 site&example:add default title to examples & update docs 2018-06-21 11:34:49 +08:00
..
demo site&example:add default title to examples & update docs 2018-06-21 11:34:49 +08:00
test Initial commit 2018-03-26 16:04:04 +08:00
README.en-US.md correct tabs 2018-05-30 15:45:37 +08:00
README.md doc(readme): adjust the example path for each component in its readme doc. 2018-03-29 14:56:07 +08:00
component.js Initial commit 2018-03-26 16:04:04 +08:00
index.vue style:update theme related stylus variables 2018-06-08 13:40:47 +08:00

README.en-US.md

title preview
Tabs https://didi.github.io/mand-mobile/examples/#/tabs

To create a tab page with a content area

Import

import { Tabs } from 'mand-mobile'

Vue.component(Tabs.name, Tabs)

Code Examples

API

Tabs Props

Props Description Type Default Note
titles array of titles of tab bar Array - Passing in the array will render the component directly based on the contents of the array, or you can insert a customized title button directly into the control without using this property. This value is an array of strings while not using scope-slot; or an array of objects when using scope-slot, and each object is used as props for parent component
show-ink-bar display underline Boolean true -
ink-bar-length the width of underline Number 70 the percentage of the width of underline that in the label button, between 0-100
ink-bar-animate enable underline animation Boolean true -
default-index default activated label index Number 0 -
noslide disable animation transitions Boolean false -

Tabs Methods

selectTab(index)

select a tab

Parameters Description Type Default
index index of tab Number -

Tabs Events

@change(index, preIndex)

selected tab index changes

Props Description Type
index index of current selected tab Number
preIndex index of previous selected tab Number