プロジェクト
概要
Let Vue.js support global events
Web・アプリ開発計測したスター増加
- 24時間
- 0
- 7日間
- 0
- 15日間
- 0
- 1か月
- 履歴を収集中
期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。
README.md
オリジナルVue 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
関連プロジェクトを探す
読み込み中…