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

How to get this to work with Nuxt? #125

@ShetlandJ

Description

@ShetlandJ

Having followed the installation instructions religiously, and read many, many posts online, I still can't figure out how to register vue-touch as a component with Nuxt. Can anyone help me out please?

package.json:
"vue-touch": "2.0.0-beta.4"

plugins/global.js:

import Vue from 'vue'
var VueTouch = require('vue-touch')

Vue.use(VueTouch, {name: 'v-touch'})

nuxt.config.js:
vendor: ['vue-touch'],

  plugins: [
    { src: '~plugins/global', ssr: false }
  ]

And my HTML template in my Vue file:

<template>
  <no-ssr>
    <div class="main">
      <div id="slider" class="slider" >
        <v-touch @pan="mouseMoving" @panend="stopDrag" @swipe="startDrag">
          <div class="slider-cards" :style="`transform: translate3d(${cardsX}px,0,0)`">
            <div v-for="num in 3" class="slider-card">
              <Card />
            </div>
          </div>
        </v-touch>
      </div>
    </div>
  </no-ssr>
</template>

I can't find anything out there to help me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions