vue-method-plugin

1.1.0 • Public • Published

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()
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i vue-method-plugin

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

2.1 kB

Total Files

4

Last publish

Collaborators

  • t-leung-sportradar
  • jbellsr
  • toby_c_sr
  • domdo.es
  • sraugier
  • markdavies618
  • joestefan
  • maxweston
  • f8
  • samstefan
  • mattdaviesf8
  • gabriellfsouza
  • phl3bas