Archived
2
0
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
2020-02-01 20:35:48 +00:00

26 lines
409 B
TypeScript

import { PluginObject } from 'vue'
import axios, { AxiosStatic } from 'axios'
declare global {
const $http: AxiosStatic
interface Window {
$http: AxiosStatic
}
}
declare module 'vue/types/vue' {
interface Vue {
$http: AxiosStatic
}
}
const plugin: PluginObject<undefined> = {
install(Vue) {
window.$http = axios
Vue.prototype.$http = window.$http
},
}
export default plugin