From 979058ad95d9669cb113033f76b5dafb932aad0f Mon Sep 17 00:00:00 2001
From: Vben <anncwb@126.com>
Date: 星期六, 27 三月 2021 16:03:28 +0800
Subject: [PATCH] perf: refoctor useTitle

---
 src/utils/index.ts |   29 -----------------------------
 1 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/src/utils/index.ts b/src/utils/index.ts
index 81bf432..ca45a10 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -62,35 +62,6 @@
   return ret as Partial<U>;
 }
 
-/**
- * set page Title
- * @param {*} title  :page Title
- */
-function setDocumentTitle(title: string) {
-  document.title = title;
-  const ua = navigator.userAgent;
-  const regex = /\bMicroMessenger\/([\d.]+)/;
-  // 鍏煎
-  if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) {
-    const i = document.createElement('iframe');
-    i.src = '/favicon.ico';
-    i.style.display = 'none';
-    i.onload = function () {
-      setTimeout(function () {
-        i.remove();
-      }, 9);
-    };
-    document.body.appendChild(i);
-  }
-}
-
-export function setTitle(title: string, appTitle?: string) {
-  if (title) {
-    const _title = title ? ` ${title} - ${appTitle} ` : `${appTitle}`;
-    setDocumentTitle(_title);
-  }
-}
-
 export function getRawRoute(route: RouteLocationNormalized): RouteLocationNormalized {
   if (!route) return route;
   const { matched, ...opt } = route;

--
Gitblit v1.8.0