Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiChiaChang committed Aug 16, 2017
1 parent 63575cc commit 514b7b7
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 9 deletions.
46 changes: 42 additions & 4 deletions README.md
Expand Up @@ -5,9 +5,7 @@

Simple accordion menu component in Vue 2

<p align="center">
<img alt="AccordionMenu" style="display: none; margin: 0 auto;" src="https://i.imgur.com/Cefw7Nd.gif">
</p>
![AccordionMenu](https://i.imgur.com/Cefw7Nd.gif)

## Table of contents

Expand Down Expand Up @@ -112,7 +110,47 @@ Vue.component('AccordionMenu', AccordionMenu)

# Usage

> TODO
First of all, after installing successfully then type these command in your main.js:

```javascript
import { AccordionMenu } from 'vue-accordion-menu'
Vue.component('AccordionMenu', AccordionMenu)
```

Now you can add some customized contents for your accordion menu (use App.vue for example):

```javascript
data () {
return {
contents: [
{
title: 'How are you?',
msg: 'Test for fun!',
},
{
title: 'Who let the dog out?',
msg: 'I do not know, dude.',
},
{
title: '肚子好餓?',
msg: '吃芭樂啦!',
},
{
title: 'Find hotels?',
msg: 'Trivago!',
},
],
}
}
```

Last step, use it!

```javascript
<AccordionMenu :contents="contents"></AccordionMenu>
```

Enjoy your customized AccordionMenu! ![turtle](http://i.imgur.com/879dfXS.gif)

# Example

Expand Down
2 changes: 1 addition & 1 deletion dist/vue-accordion-menu.browser.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/vue-accordion-menu.common.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 514b7b7

Please sign in to comment.