mirror of https://github.com/certd/certd
perf: 修复站点个性化,浏览器标题没有生效的bug
parent
60a2ed48c2
commit
bcfac02c96
|
@ -69,7 +69,8 @@ router.afterEach((to: any) => {
|
|||
// }
|
||||
pageStore.open(to);
|
||||
// 更改标题
|
||||
site.title(to.meta.title);
|
||||
const settingStore = useSettingStore();
|
||||
site.title(to.meta.title, settingStore.siteInfo.title);
|
||||
|
||||
//修改左侧边栏
|
||||
const matched = to.matched;
|
||||
|
|
|
@ -4,8 +4,8 @@ export const site = {
|
|||
* @description 更新标题
|
||||
* @param titleText
|
||||
*/
|
||||
title: function (titleText: string) {
|
||||
const processTitle = env.TITLE || "FsAdmin";
|
||||
title: function (titleText: string, baseTitle?: string) {
|
||||
const processTitle = baseTitle || env.TITLE || "Certd";
|
||||
window.document.title = `${processTitle}${titleText ? ` | ${titleText}` : ""}`;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue