Explorar el Código

fix: 修复vscode全局属性ts爆红问题
参照vuejs官方文档,[扩展全局属性](https://cn.vuejs.org/guide/typescript/options-api.html#augmenting-global-properties),

```ts
declare module 'vue' {
interface ComponentCustomProperties {
$http: typeof axios
$translate: (key: string) => string
}
}
```

Signed-off-by: dhb52 <dhb52@126.com>

dhb52 hace 2 años
padre
commit
bbcedd02ba
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/types/module.d.ts

+ 1 - 1
src/types/module.d.ts

@@ -11,7 +11,7 @@ import { download as rd } from '@/utils/request';
 
 export {};
 
-declare module '@vue/runtime-core' {
+declare module 'vue' {
   interface ComponentCustomProperties {
     // 全局方法声明
     $modal: typeof modal;