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>
This commit is contained in:
parent
abf2777b2e
commit
bbcedd02ba
2
src/types/module.d.ts
vendored
2
src/types/module.d.ts
vendored
@ -11,7 +11,7 @@ import { download as rd } from '@/utils/request';
|
|||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|
||||||
declare module '@vue/runtime-core' {
|
declare module 'vue' {
|
||||||
interface ComponentCustomProperties {
|
interface ComponentCustomProperties {
|
||||||
// 全局方法声明
|
// 全局方法声明
|
||||||
$modal: typeof modal;
|
$modal: typeof modal;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user