Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

Releases: vuejs/vue-touch

v2.0.0-beta.3

16 Jan 18:51
Compare
Choose a tag to compare
v2.0.0-beta.3 Pre-release
Pre-release

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

14 Jan 13:16
Compare
Choose a tag to compare
v2.0.0-beta.2 Pre-release
Pre-release

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

06 Jan 12:41
Compare
Choose a tag to compare
v2.0.0-beta.1 Pre-release
Pre-release

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.