vue-geventbus
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

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 Api VueEventBus Api
$on $gon
$once $gonce
$emit $gemit
$off $goff

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

Package Sidebar

Install

npm i vue-geventbus

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

15.6 kB

Total Files

6

Last publish

Collaborators

  • banxi