From 07bde250ff1b7ce2ad03f9666d05872181ad11ff Mon Sep 17 00:00:00 2001
From: pany <939630029@qq.com>
Date: Wed, 21 Jun 2023 10:28:04 +0800
Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96=20?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=20global-components.d.ts=20=E5=85=A8?=
=?UTF-8?q?=E5=B1=80=E6=B3=A8=E5=86=8C=E7=BB=84=E4=BB=B6=E7=9A=84=E7=B1=BB?=
=?UTF-8?q?=E5=9E=8B=E6=96=87=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Screenfull/index.vue | 2 +-
src/layout/components/Sidebar/SidebarItem.vue | 4 ++--
types/global-components.d.ts | 10 ++++++++++
3 files changed, 13 insertions(+), 3 deletions(-)
create mode 100644 types/global-components.d.ts
diff --git a/src/components/Screenfull/index.vue b/src/components/Screenfull/index.vue
index c5146bb..252ff8a 100644
--- a/src/components/Screenfull/index.vue
+++ b/src/components/Screenfull/index.vue
@@ -44,7 +44,7 @@ watchEffect((onCleanup) => {
-
+
diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue
index dcefc29..0a7dfe5 100644
--- a/src/layout/components/Sidebar/SidebarItem.vue
+++ b/src/layout/components/Sidebar/SidebarItem.vue
@@ -62,7 +62,7 @@ const resolvePath = (routePath: string) => {
-
+
{{ theOnlyOneChild.meta.title }}
@@ -72,7 +72,7 @@ const resolvePath = (routePath: string) => {
-
+
{{ props.item.meta.title }}
diff --git a/types/global-components.d.ts b/types/global-components.d.ts
new file mode 100644
index 0000000..bf3693b
--- /dev/null
+++ b/types/global-components.d.ts
@@ -0,0 +1,10 @@
+import SvgIcon from "@/components/SvgIcon/index.vue"
+
+/** 由 app.component 全局注册的组件需要在这里声明 TS 类型才能获得 Volar 插件提供的类型提示) */
+declare module "vue" {
+ export interface GlobalComponents {
+ SvgIcon: typeof SvgIcon
+ }
+}
+
+export {}