1.0.2 • Published 6 years ago

vue-geventbus v1.0.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago

Vue Global EventBus

Introduction

Let Vue.js support global events

TypeScript support already (actually this plugin is written by TypeScript)

install

$ npm i vue-geventbus -S
# or
$ yarn add vue-geventbus -S

Usage

  1. Install this Vue plugin
import VueEventBus from "vue-geventbus";
Vue.use(VueEventBus);
  1. use Global Event function just like Vue.$on ,Vue.$emit, but this plugin handle global event below is the table
Vue ApiVueEventBus Api
$on$gon
$once$gonce
$emit$gemit
$off$goff

More see: https://cn.vuejs.org/v2/api/#vm-on