vue-slide-tabs
v1.1.3
Published
A vue.js slider tabs for mobile
Downloads
40
Maintainers
Readme
vue-slide-tabs
A vue.js slider tabs for mobile
Demo
https://lpeihan.github.io/vue-slide-tabs/
Installation
npm install vue-slide-tabs --save
Usage
<template>
<div class="app">
<tabs :tabs="tabs" class="tab-container">
<div>This is first tab</div>
<div>This is second tab</div>
<div>This is third tab</div>
</tabs>
</div>
</template>
<script>
import Tabs from "vue-slide-tabs";
export default {
name: "app",
components: {
Tabs
},
data() {
return {
tabs: [
{
label: "关注"
},
{
label: "推荐"
},
{
label: "最新"
}
]
};
}
};
</script>
Options
Props
| Option | Type | Description | Default | | ------ | ----- | ----------- | ------- | | tabs | Array | tabs | [] |
Events
| Option | Description | params | | ------ | -------------------------------- | -------- | | change | triggers when current tab change | tabIndex |