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: 4 days ago
JSON representation
A lightweight slide component for vue
- Host: GitHub
- URL: https://github.com/hilongjw/vue-slide
- Owner: hilongjw
- Created: 2016-03-12T09:58:48.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-02-01T13:27:08.000Z (almost 7 years ago)
- Last Synced: 2025-01-14T08:08:13.399Z (12 days ago)
- Topics: vue, vue-slide
- Language: JavaScript
- Homepage: http://hilongjw.github.io/vue-slide/demo.html
- Size: 2.02 MB
- Stars: 208
- Watchers: 7
- Forks: 46
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-vue-cn - Vue-slide ★29
- awesome-vue - vue-slide - slide?style=social) - vue轻量级滑动组件 (UI组件)
- awesome-github-vue - vue-slide - vue轻量级滑动组件 (UI组件)
- awesome-github-vue - vue-slide - vue轻量级滑动组件 (UI组件)
- awesome - vue-slide - vue轻量级滑动组件 (UI组件)
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)