Skip to content

Latest commit

 

History

History
50 lines (38 loc) · 1.18 KB

README.md

File metadata and controls

50 lines (38 loc) · 1.18 KB

License npm version HitCount size

vue-global-var

Reactive global variable can be sharable between components

Demo

Dependencies

Installation

$ npm install --save vue-global-var

How to use

Vue.use(VueGlobalVar, {
  globals: {
    $user: new User('user1'),
    obj:{},
    config:Config,
    ....
  },
});

Now just use this.$user is any component or $user in its template

License

MIT