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

v2.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@LinusBorg LinusBorg released this 06 Jan 12:41
· 35 commits to next since this 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.