From d115fc7af7c09429a797ee6f77f638d658ab0fd3 Mon Sep 17 00:00:00 2001 From: TimSpan Date: Fri, 16 Aug 2024 10:15:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20=E6=B5=B7=E5=BA=B7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=20ts=20=E7=88=86=E7=BA=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 解决 海康页面 ts 爆红 --- src/global.d.ts | 4 +++- src/views/page/hkplay.vue | 15 ++++++++------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/global.d.ts b/src/global.d.ts index f6635a65..719f9f16 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -1,5 +1,7 @@ declare const __APP_ENV: ImportMetaEnv; - +interface Window { + JSPlugin: any; // 根据实际情况定义类型,比如 `JSPlugin: MyPluginType` +} declare interface AppInfo { name: string; appName: string, diff --git a/src/views/page/hkplay.vue b/src/views/page/hkplay.vue index 8e55a9f2..724e8e25 100644 --- a/src/views/page/hkplay.vue +++ b/src/views/page/hkplay.vue @@ -3,8 +3,9 @@