index.ts 316 B

1234567891011121314151617
  1. import Http from './http';
  2. import config from './config';
  3. import api from '../api';
  4. const $http = new Http();
  5. $http.set_config(config);
  6. const install = (Vue:any) => {
  7. const VueCopy = Vue;
  8. VueCopy.prototype.$api = {...api};
  9. VueCopy.prototype.$http = $http;
  10. };
  11. export default { install };
  12. export {
  13. $http,
  14. }