1.1.0 • Published 6 years ago

vue-method-plugin v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

Vue.js component method plugin

Allows you to add custom methods to your components

Usage

import VueMethodLoader from 'vue-method-loader'

function myMethod () {
	console.log('myMethod')
}

Vue.use(VueMethodLoader, { $myMethod: myMethod })

This Method will now be available inside of your components e.g.

methods: {
	handleEvent: function (event) {
	  event.preventDefault()
	  this.$myMethod()
	}
}