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

Commit eefdd5d

Browse files
committed
cleanup refactor.
1 parent 14d4b76 commit eefdd5d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
import Hammer from 'hammerjs'
2-
31
import Component from './component'
42
import { assign, config, customEvents } from './utils'
53

64
let installed = false
75

86
const vueTouch = { config, customEvents }
97

10-
vueTouch.component = Component
11-
128
// Plugin API
139
// *********
1410
vueTouch.install = function install(Vue, opts = {}) {
1511
const name = opts.name || 'v-touch'
16-
Vue.component(name, assign(this.component, { name }))
12+
Vue.component(name, assign(Component, { name }))
1713
installed = true
1814
}.bind(vueTouch)
1915

@@ -27,7 +23,7 @@ vueTouch.registerCustomEvent = function registerCustomEvent(event, options = {})
2723
}
2824
options.event = event
2925
customEvents[event] = options
30-
this.component.props[`${event}Options`] = {
26+
Component.props[`${event}Options`] = {
3127
type: Object,
3228
default() { return {} }
3329
}

0 commit comments

Comments
 (0)