Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/didierfranc/v-touch
Bind HammerJS library with VueJS framework
https://github.com/didierfranc/v-touch
javascript vue-touch vuejs
Last synced: 4 months ago
JSON representation
Bind HammerJS library with VueJS framework
- Host: GitHub
- URL: https://github.com/didierfranc/v-touch
- Owner: didierfranc
- License: mit
- Created: 2016-01-28T14:39:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-25T12:39:36.000Z (over 8 years ago)
- Last Synced: 2024-08-01T00:40:01.681Z (6 months ago)
- Topics: javascript, vue-touch, vuejs
- Language: JavaScript
- Homepage:
- Size: 29.3 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vue-cn - v-touch ★5
README
# vue-touch
## Introduction
Vue-touch is the easiest way to use Hammer.js with the excellent Vue.js framework, it's essential to make decent mobile app. **Compatible with Vue.js 1.x**. This repo is perfect to understand the directive concept of VueJS, for a more comprehensive touch binding, Evan You updated the official just after I made this one : https://github.com/vuejs/vue-touch/
## Usage
Vue-touch adds the **`v-touch:event`** directive to your vue instance. You can easily play with `tap` `doubletap` `press` `swipe` `swiperight` `swipeleft` and more.## Installation
Just add `vue-touch.min.js` to your project after `vue.min.js`. It includes a fresh version of Hammer.```html
```
## Example
```html
{{ number }}
``````javascript
var app = new Vue({
el: '#app',
data : {
number: 1
},
methods : {
plus : function(){
this.number++
},
moins : function(){
this.number--
}
}
})
```## Thanks
Vue.js https://github.com/vuejs/vue
Hammer.js https://github.com/hammerjs/hammer.js## License
[MIT](http://opensource.org/licenses/MIT)
Copyright © 2016 Didier Franc