1.3.0 • Published 5 years ago

events-vue-allin v1.3.0

Weekly downloads
7
License
ISC
Repository
-
Last release
5 years ago

Events vue - Vue Component

##What is it for ?

You can use this component to trigger 
vue events as root and globally.

Getting Started

Import Component - example main.js

import Vue from 'vue'
import App from './App.vue'
import events from 'events-vue-allin'

Vue.use(events)
window.vue = new Vue({
  el: '#app',
  events,
  render: h => h(App)
})

Assign Component on Component Vue

<template>
  <div id="app">
    <button @click="testEvent">Testing event</button>
  </div>
</template>

<script>
export default {
  name: 'app',
  mounted () {
    this.$events.off('alert-events')
    this.$events.on('alert-events', function (){
      alert('Event it works')
    })
  },
  methods: {
    testEvent () {
      this.$events.emit('alert-events')
    }
  }
}
</script>
1.3.0

5 years ago

1.2.10

5 years ago

1.2.9

5 years ago

1.2.8

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago