vue-global-var icon indicating copy to clipboard operation
vue-global-var copied to clipboard

Reactive global variable can be sharable between components

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