Skip to content

Commit 5deaaeb

Browse files
committed
Remove disableClick parameter and update README. Change version to 2.0.0
1 parent 9b5786a commit 5deaaeb

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ Enable tap / swipe events for VueJS 2.x
33

44
> Note: This is for **Vue 2.x** only.
55
6+
Supports:
7+
8+
* `tap` for tap the screen or click the mouse
9+
* `longtap` for long tap
10+
* `swipe` for swipe your finger or mouse in a direction (left/top/right/bottom)
11+
* `start` for start tap or mouse down
12+
* `end` for tap end or mouse up
13+
* `moving` for moving finger or mouse
14+
15+
616
## Install
717

818
To install with npm or yarn, use
@@ -59,46 +69,34 @@ In your `.vue` file:
5969
v-touch:swipe.right="swipeRightHandler">Mix Multiple Events</span>
6070
```
6171

62-
72+
6373
## APIs
6474

6575
### Global config (optional)
6676

6777
```js
6878
Vue.use(Vue2TouchEvents, {
69-
disableClick: false,
7079
touchClass: '',
7180
tapTolerance: 10,
7281
swipeTolerance: 30,
7382
longTapTimeInterval: 400
7483
})
7584
```
7685

77-
78-
* `disableClick` default `false`. Use touch event only, will not trigger click event.
79-
80-
You should keep this value default if you use your website on both mobile and PC.
81-
82-
If your website uses on mobile only, it's a good choice to set this value to `true` to get a better user experience, and it can resolve some touch pass-through issue.
83-
8486
* `touchClass` default: `''`. Add an extra CSS class when touch start, and remove it when touch end.
8587

86-
If `disableClick` is `false`, it will bind `mouseenter` and `mouseleave` event on your components too. So you can use it instead of `:hover` and `:active`.
87-
8888
This is a global config, and you can use `v-touch-class` directive to overwrite this setting in a single component.
8989

9090
* `tapTolerance` default `10`. The tolerance to ensure whether the tap event effective or not.
9191
* `swipeTolerance` default `30`. The tolerance to ensure whether the swipe event effective or not.
9292
* `longTapTimeInterval` default `400` in millsecond. The minimum time interval to detect whether long tap event effective or not.
9393

94-
If you don't want bind `click` event at same time, just set `disableClick` to `true`.
95-
9694
### Directives
9795

9896
#### v-touch
9997
Bind the `v-touch` directive to components which you want to enable touch events.
10098

101-
`v-touch` accepts an argument to tell it which event you want to bind. `tap`, `longtap` and `swipe` are available.
99+
`v-touch` accepts an argument to tell it which event you want to bind.
102100

103101
```html
104102
<span v-touch:tap="tapHandler">Tap</span>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue2-touch-events",
3-
"version": "1.1.3",
3+
"version": "2.0.0",
44
"description": "Simple touch events support for vueJS2",
55
"main": "index.js",
66
"types": "index.d.ts",

0 commit comments

Comments
 (0)