app.$http = axios; Can LOGIN now
This commit is contained in:
14
src/types/vue.d.ts
vendored
Normal file
14
src/types/vue.d.ts
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { AxiosInstance } from 'axios';
|
||||
import { App } from 'vue';
|
||||
|
||||
declare module '@vue/runtime-core' {
|
||||
interface ComponentCustomProperties {
|
||||
$http: AxiosInstance;
|
||||
}
|
||||
}
|
||||
|
||||
// 將類型擴展到 Vue 應用實例
|
||||
declare module 'vue' {
|
||||
interface App {
|
||||
$http: AxiosInstance;
|
||||
}
|
||||
Reference in New Issue
Block a user