From bbcedd02baa053a88688a82fc72e87c857c82db2 Mon Sep 17 00:00:00 2001 From: dhb52 Date: Wed, 3 Jan 2024 03:40:39 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dvscode=E5=85=A8?= =?UTF-8?q?=E5=B1=80=E5=B1=9E=E6=80=A7ts=E7=88=86=E7=BA=A2=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20=E5=8F=82=E7=85=A7vuejs=E5=AE=98=E6=96=B9=E6=96=87?= =?UTF-8?q?=E6=A1=A3=EF=BC=8C[=E6=89=A9=E5=B1=95=E5=85=A8=E5=B1=80?= =?UTF-8?q?=E5=B1=9E=E6=80=A7](https://cn.vuejs.org/guide/typescript/optio?= =?UTF-8?q?ns-api.html#augmenting-global-properties)=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ```ts declare module 'vue' { interface ComponentCustomProperties { $http: typeof axios $translate: (key: string) => string } } ``` Signed-off-by: dhb52 --- src/types/module.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/module.d.ts b/src/types/module.d.ts index bc2f16b..984df9f 100644 --- a/src/types/module.d.ts +++ b/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;