Proyectos
Ver en GitHub
JserWang/vue-event-proxy
Acerca de
Let Vue.js support global events
Desarrollo web y de aplicacionesCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalVue Event Proxy
Introduction
The Library that let Vue.js support global events, just 1.79kb after compression.
- Global events are implemented by adding a prefix
- Registered event will be removed when component is destroyed
Demo: CodeSandbox
install
$ npm install --save vue-event-proxy
Usage
Just add global: prefix to first argument of methods: $on, $emit, $once
import EventProxy from 'vue-event-proxy';
Vue.use(EventProxy);
this.$on('global:EVENT_NAME');
this.$once('global:EVENT_NAME');
this.$emit('global:EVENT_NAME');
More see: https://cn.vuejs.org/v2/api/#vm-on
Explorar proyectos relacionados
Cargando…