Forráskód Böngészése

feat:修复安卓title问题

coder 2 éve%!(EXTRA string=óta)
szülő
commit
48291a0dc8
3 módosított fájl, 5 hozzáadás és 4 törlés
  1. 1 1
      .env
  2. 2 2
      src/pages/index.vue
  3. 2 1
      src/router/index.ts

+ 1 - 1
.env

@@ -1 +1 @@
-VITE_APP_TITLE = '景宁H5'
+VITE_APP_TITLE = ''

+ 2 - 2
src/pages/index.vue

@@ -18,7 +18,7 @@ for (const item of menuList) {
       })
     })
 
-    // document.title = item.title
+    document.title = item.title
     menuListData = item
   }
 }
@@ -29,7 +29,7 @@ function linkTo(child) {
     })
   })
 
-  // document.title = child.menuName
+  document.title = child.menuName
   router.push(child.path)
 }
 </script>

+ 2 - 1
src/router/index.ts

@@ -2,7 +2,8 @@ import { createRouter, createWebHashHistory } from 'vue-router'
 import routes from 'virtual:generated-pages'
 
 // import { user } from '~/store/index'
-document.title = import.meta.env.VITE_APP_TITLE
+// document.title = import.meta.env.VITE_APP_TITLE
+// document.title = ''
 const router = createRouter({
   history: createWebHashHistory(import.meta.env.BASE_URL),
   routes,