Skip to content

Commit

Permalink
version 0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Nov 9, 2016
1 parent 4887722 commit b6fdafc
Show file tree
Hide file tree
Showing 15 changed files with 2,341 additions and 183 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"presets": [
"es2015-rollup",
"es2015",
"stage-0"
],
"plugins": [
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ npm-debug.log*
node_modules

lib
utils
webpack

.eslint*
.travis*
Expand Down
66 changes: 64 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,68 @@
# v-touch
A full-featured gesture component designed for Vue

## [WIP]
~~__*This module is still working in progress right now, so it is just for placeholder.*__~~

__*This module is still working in progress right now, so it is just for placeholder.*__
Now, you can try to use `v-touch` in your project!

## Usage

A deadly simply example:

``` app.js
import Vue from 'vue'
import VTouch from 'v-touch'
Vue.use(VTouch)
```

``` touch.vue
<template>
<button v-touch="touchOptions">
{{ msg }}
</button>
</template>
<script>
export default {
data() {
return {
msg: 'try to move me!'
}
},
computed: {
touchOptions() {
return {
x: false,
y: false,
handler: {
tap() {
console.log('tap')
},
dbTap() {
console.log('dbTap')
},
press() {
console.log('press')
},
swipeLeft() {
console.log('swipeLeft')
},
swipeRight() {
console.log('swipeRight')
},
swipeUp() {
console.log('swipeUp')
},
swipeDown() {
console.log('swipeDown')
}
}
}
}
}
}
</script>
```

## Document

[WIP]
Loading

0 comments on commit b6fdafc

Please sign in to comment.