Commit 6df9a711529760537758b1a3df0cfa2db1d76df1

Authored by ww
1 parent e2056a64

fix: 修复平台定制信息未回显页面title

... ... @@ -13,7 +13,7 @@
13 13 name="viewport"
14 14 content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
15 15 />
16   - <title> <%= title %> </title>
  16 + <title></title>
17 17 <link rel="icon" href="/favicon.ico" />
18 18 </head>
19 19
... ...
... ... @@ -67,7 +67,6 @@
67 67 import { useI18n } from '/@/hooks/web/useI18n';
68 68 import { useDesign } from '/@/hooks/web/useDesign';
69 69 import { useLocaleStore } from '/@/store/modules/locale';
70   - import { useTitle } from '@vueuse/core';
71 70 import defaultBackgroundImage from '/@/assets/svg/thingskit-login-background.svg';
72 71 import { getPlatFormInfo } from '../../system/customize/hook/usePlatformInfo';
73 72
... ... @@ -85,10 +84,6 @@
85 84 const localeStore = useLocaleStore();
86 85 const showLocale = localeStore.getShowPicker;
87 86
88   - onMounted(() => {
89   - useTitle('ThingsKit 物联网平台');
90   - });
91   -
92 87 const show = ref(false);
93 88
94 89 onMounted(() => {
... ...
... ... @@ -82,10 +82,15 @@ export const usePlatform = async () => {
82 82 document.head.appendChild(styleEl);
83 83 };
84 84
  85 + const setTitle = () => {
  86 + document.title = platformInfo.name;
  87 + };
  88 +
85 89 const bootstrap = () => {
86 90 replaceSiteIco();
87 91 replaceLoadingEffect();
88 92 setBackgroundImage();
  93 + setTitle();
89 94 };
90 95
91 96 bootstrap();
... ...