1.1.3 • Published 7 years ago
vue-slide-tabs v1.1.3
vue-slide-tabs
A vue.js slider tabs for mobile
Demo
https://lpeihan.github.io/vue-slide-tabs/
Installation
npm install vue-slide-tabs --saveUsage
<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 |