Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/hilongjw/vue-slide

A lightweight slide component for vue
https://github.com/hilongjw/vue-slide

vue vue-slide

Last synced: 3 months ago
JSON representation

A lightweight slide component for vue

Lists

README

        

# vue-slide

# Demo

![](https://ww3.sinaimg.cn/large/69402bf8jw1fajs22iy8ng20xy0gsqv7.gif)

The demo page is [HERE](http://hilongjw.github.io/vue-slide/demo.html).

# Installation

## npm

```shell
$ npm install vue-slide
```

# Usage

## Basic

```html


```
```

import rdSwipe from 'vue-slide'
export default {
data () {
return {
swipe: {
activeIndex: 0
},
imgs: [
'http://covteam.u.qiniudn.com/test18.jpg',
'http://covteam.u.qiniudn.com/test19.jpg',
'http://covteam.u.qiniudn.com/test20.jpg',
'http://covteam.u.qiniudn.com/test21.jpg'
]
}
}
}

```

## Advance

```





{{contact.text}}







import rdSwipe from './Slide.vue'
export default {
data () {
return {
swipe: {
activeIndex: 0
},
contacts: [{
text: 'Page 1'
}, {
text: 'Page 2'
}, {
text: 'Page 3'
}, {
text: 'Page 4'
}],
imgs: [
'http://covteam.u.qiniudn.com/test18.jpg',
'http://covteam.u.qiniudn.com/test19.jpg',
'http://covteam.u.qiniudn.com/test20.jpg',
'http://covteam.u.qiniudn.com/test21.jpg'
]
}
},
components: {
rdSwipe
},
methods: {
turnTo (index) {
this.$children.map(swipe => {
if (swipe.turnTo) {
swipe.turnTo(index)
}
})
}
}
}

```

# License

[The MIT License](http://opensource.org/licenses/MIT)