From 56a966cfbf8db5b29a42185f0f25a0e800c30dbb Mon Sep 17 00:00:00 2001
From: vben <anncwb@126.com>
Date: 星期二, 24 八月 2021 22:41:48 +0800
Subject: [PATCH] chore: format code

---
 src/hooks/web/useTitle.ts |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/hooks/web/useTitle.ts b/src/hooks/web/useTitle.ts
index 7566ce5..b541ae8 100644
--- a/src/hooks/web/useTitle.ts
+++ b/src/hooks/web/useTitle.ts
@@ -6,6 +6,9 @@
 
 import { REDIRECT_NAME } from '/@/router/constant';
 
+/**
+ * Listening to page changes and dynamically changing site titles
+ */
 export function useTitle() {
   const { title } = useGlobSetting();
   const { t } = useI18n();
@@ -17,6 +20,7 @@
     () => currentRoute.value.path,
     () => {
       const route = unref(currentRoute);
+
       if (route.name === REDIRECT_NAME) {
         return;
       }
@@ -24,6 +28,6 @@
       const tTitle = t(route?.meta?.title as string);
       pageTitle.value = tTitle ? ` ${tTitle} - ${title} ` : `${title}`;
     },
-    { immediate: true }
+    { immediate: true },
   );
 }

--
Gitblit v1.8.0