系统名称使用变量修正

This commit is contained in:
yaoyn
2025-05-30 11:29:54 +08:00
parent 88c193fc0e
commit e2d478c851
5 changed files with 17 additions and 9 deletions

View File

@ -25,6 +25,7 @@
import { useUserStore } from '/@/store/modules/user';
import { useTabs } from '/@/hooks/web/useTabs';
import { useTitle } from '@vueuse/core';
import {useGlobSetting} from "/@/hooks/setting";
const loading = ref(true);
const desktop = reactive({ hasCustomDesktop: false, list: [] });
@ -39,6 +40,7 @@
const userStore = useUserStore();
const userInfo = userStore.getUserInfo;
const { setTitle } = useTabs();
const { title } = useGlobSetting();
watch(
() => userInfo.desktopSchema,
@ -56,7 +58,7 @@
//设置Tab标题
setTitle(desktopSchema.name);
//设置浏览器标题
useTitle(` ${desktopSchema.name} `);
useTitle(` ${desktopSchema.name} - ${title} `);
desktop.hasCustomDesktop = true;
}
}