# tab-slider

> A Vue component that can switch tabs by swiping the screen to the left or right

Latest version **1.1.3** (published 2018-08-01) · 0 weekly downloads

## Install

```sh
npm install tab-slider
pnpm add tab-slider
yarn add tab-slider
bun add tab-slider
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2018-08-01 |
| First published | 2018-04-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 6.0.0 |
| Dependencies | 3 |
| Unpacked size | 46.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | miao |
| Maintainers | myl0204 |

## Links

- npm: https://www.npmjs.com/package/tab-slider
- npm.io page: https://npm.io/package/tab-slider

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.5.2
- [vue-router](https://npm.io/package/vue-router.md) ^3.0.1
- [compression-webpack-plugin](https://npm.io/package/compression-webpack-plugin.md) ^1.1.11

## Recent versions

- 1.1.3 (latest) — 2018-08-01
- 1.1.2 — 2018-04-30
- 1.1.1 — 2018-04-30
- 1.1.0 — 2018-04-13
- 1.0.12 — 2018-04-10
- 1.0.11 — 2018-04-10
- 1.0.10 — 2018-04-10
- 1.0.9 — 2018-04-10
- 1.0.8 — 2018-04-10
- 1.0.7 — 2018-04-10
- 1.0.6 — 2018-04-10
- 1.0.5 — 2018-04-10
- 1.0.4 — 2018-04-10
- 1.0.3 — 2018-04-09
- 1.0.2 — 2018-04-09
- … 2 more at https://npm.io/package/tab-slider/versions

## README

# tab-slider
[![npm](https://img.shields.io/npm/v/tab-slider.svg)](https://www.npmjs.com/package/tab-slider)
> A Vue component that can switch tabs by swiping the screen to the left or right


## Install
``` bash
npm install tab-slider -S
```
## Usage
1. in `main.js`
``` js
import TabSlider from 'tab-slider'
import 'tab-slider/dist/index.css'
Vue.use(TabSlider)
```
2. in `.Vue` file
> note that you still need import the css file in main.js
``` js
import TabSlider from 'tab-slider'
export default {
  components: {
    TabSlider
  }
}
```
## API
Attribute | Description | Type | example
----|---|---|---
comp(required)|A array contains all router components|Array|[{name: 'comp1', component: foo}, {name: 'comp2', component: bar}]
defalut-index(optional)|index of default component to dispaly, default to 0|Number| 1
> note the `name` attribute in comp must same as the name in route,that is,you must identify a route with a name,see [Named Routes](https://router.vuejs.org/en/essentials/named-routes.html#) or you can pass the `path` attribute to it.
---
中文版本：

属性 | 描述 | 类型 | 例子
----|---|---|---
comp(必需)|包含所有路由组件的数组|Array|[{name: 'comp1', component: foo}, {name: 'comp2', component: bar}]
defalut-index(可选)|默认要跳转的路由索引，从0开始|Number| 1
> comp属性中的name属性的值必须和路由name属性的值相同，也就是说，你必须给你的路由组件命名。相关信息[命名路由](https://router.vuejs.org/zh-cn/essentials/named-routes.html#)，或者你也可以传`path`参数进去。
## no tab
因为tab样式可能是多种多样的。所以不做tab，只关注slider部分。

---
_Source: https://npm.io/package/tab-slider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
