install.js 755 B

1234567891011121314151617181920
  1. import BaseTool from './tool';
  2. import DictCache from './dict';
  3. import { GlobalConstant, Constant } from '@/constant';
  4. import * as http from '@/api/index';
  5. import Message from '@/utils/message';
  6. import LOG from '@/utils/log';
  7. export default {
  8. // Vue.js的插件应当有一个公开方法 install。这个方法的第一个参数是 Vue 构造器,第二个参数是一个可选的选项对象。
  9. vm: {},
  10. install: function (Vue) {
  11. Vue.prototype.$BaseTool = BaseTool;
  12. Vue.prototype.$DictCache = DictCache;
  13. Vue.prototype.$GlobalConstant = GlobalConstant;
  14. Vue.prototype.$Constant = Constant;
  15. Vue.prototype.$Http = http;
  16. Vue.prototype.$Message = Message;
  17. Vue.prototype.$Log = LOG;
  18. }
  19. };