vue3-touch-events
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -416,2 +416,3 @@ /** | ||
*/ | ||
export default vueTouchEvents | ||
export default { vueTouchEvents } |
{ | ||
"name": "vue3-touch-events", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Simple touch events support for vue.js 3", | ||
"type": "module", | ||
"main": "index.js", | ||
@@ -6,0 +7,0 @@ "types": "index.d.ts", |
@@ -7,2 +7,6 @@ # vue3-touch-events [![](https://img.shields.io/npm/v/vue3-touch-events.svg)](https://www.npmjs.com/package/vue3-touch-events) | ||
### Note: Press the play button to the right of the image! | ||
![Events](https://github.com/robinrodricks/vue3-touch-events/raw/master/images/animation.gif) | ||
Released under the permissive MIT License. | ||
@@ -12,3 +16,3 @@ | ||
- Declarative syntax for common touch events, such as `tap`, `swipe`, `touchhold` ([more](#Events)) | ||
- Declarative syntax for common touch events, such as `tap`, `swipe`, `hold`, `drag` and [more](#Events) | ||
- All events support desktop (mouse) and mobile devices (touch screen) with the same syntax | ||
@@ -129,3 +133,3 @@ - Automatically add styling on hover and tap using `v-touch-class` directive | ||
methods: { | ||
onTapItem() { | ||
onTapItem(mouseEvent) { // you can remove the `mouseEvent` argument | ||
console.log("Tapped!"); | ||
@@ -149,3 +153,3 @@ }, | ||
onSwipeItem(item, i) { | ||
return function (direction, event) { | ||
return function (direction, mouseEvent) { | ||
console.log("Swiped item ", i, ": ", item, " in direction ", direction); | ||
@@ -311,3 +315,3 @@ }; | ||
- `touchHoldTolerance` in milliseconds - The timeout for a `touchhold` event. **Default:** `400` MS | ||
- `touchHoldTolerance` in milliseconds - The timeout for a `hold` event. **Default:** `400` MS | ||
@@ -314,0 +318,0 @@ - `swipeTolerance` in pixels - How many pixels the user must drag on the element for it to register as a `swipe` event. **Default:** `30` pixels. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
31622
6
350
321
Yes