Skip to content

Commit

Permalink
1.5.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
evseevdev committed Nov 29, 2018
1 parent d60ae96 commit ecc7622
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 17 deletions.
59 changes: 43 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,66 @@
# vue-simple-tabs

Tabs component for vue.js

## Installation:
## Installation

NPM:

```bash
npm install --save vue-simple-tabs
```

Yarn:

```bash
yarn add vue-simple-tabs
```

## Usage:
## Usage

```html
<template>
<tabs>
<tab title="Tab 1" active="true">
Tab 1 content
</tab>
<tab title="Tab 2">
Tab 2 content
</tab>
<tab title="Tab 3">
Tab 3 content
</tab>
<tab title="Tab 1" active="true">Tab 1 content</tab>
<tab title="Tab 2">Tab 2 content</tab>
<tab title="Tab 3">Tab 3 content</tab>
</tabs>
</template>

<script>
import { Tabs, Tab } from 'vue-simple-tabs';
export default {
components: { Tabs, Tab }
};
</script>
```

## Events

You can add a handler for tab changed event.

Example:

```html
<template>
<tabs @changed="tabChanged">
<tab title="Tab 1" active="true">Tab 1</tab>
<tab title="Tab 2">Tab 2</tab>
<tab title="Tab 3">Tab 3</tab>
</tabs>
</template>

<script>
import { Tabs, Tab } from 'vue-simple-tabs';
import { Tabs, Tab } from 'vue-simple-tabs';
export default {
components: { Tabs, Tab }
}
export default {
components: { Tabs, Tab },
methods: {
tabChanged(tab) {
// Do something
}
}
};
</script>
```
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-simple-tabs",
"version": "1.4.2",
"version": "1.5.0",
"description": "Tabs component for vue.js",
"main": "src/index.js",
"scripts": {
Expand Down

0 comments on commit ecc7622

Please sign in to comment.