vue-global-options

Make specified options you pass into your root component available on all your child components
5,995 1
Install
npm install vue-global-options
Latest Version:1.0.1
License:ISC
Last Updated:Jan 2, 2018
Links: GitHub  ·  npm
Maintainer: benirose

vue-global-options

Make specified options you pass into your root component available on all your child components

Usage

npm install vue-global-options
import GlobalOptions from 'vue-global-options';
Vue.use(GlobalOptions, ['api', 'config']);

new Vue({
  ...
  api: apiClient,
  config: require('./config')
  ...
});

// Params named `$api` and `$config` will be injected in to every component, so in your component, you can get them easily
this.$api.get(...);
this.$config.whatever;

Warning

This plugin does not check for any collision or prevent you from using reserved words, it simply will take specified options passed to the root component (or any component) and set them as this.$VARIABLE.

Related Packages

fy-form-render3

测试环境版本新的更新

10,811
use-on-demand

按需使用的代码工具仓库。

5,487
metaflow-js

EntityFramework for Metaflow

2,894 0
paul-utils-js

这是一个js工具代码库

2,296

Version History

Version Released License
1.0.1 ISC
1.0.0 ISC