Skip to content

Commit 990454c

Browse files
authored
Merge pull request #70 from xiaofan9/bug_fix-vue2-ts-err
Fix the bug that the attribute does not exist in vue2 + ts
2 parents 7985e40 + 8ca42cb commit 990454c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

index.d.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ declare module "@vue/runtime-core" {
1212
}
1313
}
1414

15+
declare module 'vue/types/vue' {
16+
interface Vue {
17+
$http: AxiosStatic;
18+
axios: AxiosStatic;
19+
}
20+
21+
interface VueConstructor {
22+
axios: AxiosStatic;
23+
}
24+
}
25+
1526
declare function VueAxios(app: App, axios: AxiosStatic): void;
1627

1728
export default VueAxios;

0 commit comments

Comments
 (0)