Releases: vuejs/vue-touch
v2.0.0-beta.3
New Features
The 'options' prop
Hammer accepts a few general options that are normally passed when creating a Hammer instance with new Hammer()
or new Hammer.Manager()
.
In vue-touch, you can pass those options via the options
prop:
Prop | allowed Values |
---|---|
options | https://hammerjs.github.io/api/#hammer.defaults |
Example
<v-touch options="{ touchAction: 'pan' }" />
v2.0.0-beta.2
Bugfixes:
none.
New Features
- Now SSR-compatible See README
- New Prop:
enabled
<!-- enable all recognizers -->
<v-touch v-bind:enabled="true" v-on:tap="callback" />
<!-- disable all recognizers -->
<v-touch v-bind:enabled="false" v-on:tap="callback" />
<!-- pass an object to enable and disable recognizers individually -->
<v-touch v-bind:enabled="{ pinch: true, rotate: false }" v-on:tap="callback" />
v2.0.0-beta.1
This is the first Beta release of VueTouch 2.0.0
, compatible with Vue 2.*
and HammerJS 2.*
Installation
The beta release is available on npm with the next
tag:
npm install vue-touch@next
Breaking Changes
As explained in #64, we re-wrote vue-touch from the ground up as a component, which is in line with the philosophy of Vue 2.0 to do more work in components and less with custom directives, whose responsibility was reduced to low-level DOM operations.
This, of course, means a complete breaking change in the API, but the switch should be manageable.
The new interface loos like this:
<v-touch tag="a" v-on:swiperight="callback" v-bind:swipe-options="{threshold: 150}">
Swipe right to delete this
</v-touch>
For more information, see the README in the next
branch.
New Features
The component exposes a few public methods that can be used to programmatically enable and disable some or all the recognizers.
<template>
<v-touch ref="tapper" @tap="callback"></v-touch>
</template>
<script>
export default {
methods: {
disableTap() {
this.$refs.tapper.disable('tap')
},
enableTap() {
this.$refs.tapper.enable('tap')
}
}
}
</script>
For more information, see the README in the next
branch.
Reporting Issues
As this is a Beta release, we would be happy if you could take it for a spin and report back any problems you come across with an issue in this repo.