1.0.5 • Published 3 years ago

vue-attach-event v1.0.5

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

vue-attach-event

Directive to be able to attach events through other events on HTML elements in VueJS

Install

NPM:

npm i --save vue-attach-event

Require it in your main.js (or index.js) file:

// ES6
import 'vue-attach-event';

Usage instructions

Add v-attach-event as an attribute on the element you wish to handle a new event and pass and config object:

<button v-attach-event="config" @click="handler" @my-event="handler2">

Config

{
  on: 'eventName',
  newEvent: 'newEventName'
}
  • on (Required): Name of the original event that will trigger the new event.
  • newEvent (Required): Name of the new event to run with the original event.

License

MIT

TODO

  • Add event modifiers
  • Handler when config object changes
1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago