1
0
forked from dyf/dyf-vue-ui

修复类型字典问题

This commit is contained in:
微微一笑
2025-08-20 13:47:12 +08:00
parent d96b28a0b9
commit 1cfb5581c8
10 changed files with 104 additions and 48 deletions

View File

@ -8,8 +8,10 @@
import { useSettingsStore } from '@/store/modules/settings';
import { handleThemeStyle } from '@/utils/theme';
import { useAppStore } from '@/store/modules/app';
import { useUserStore } from '@/store/modules/user';
const appStore = useAppStore();
const userStore = useUserStore();
onMounted(() => {
nextTick(() => {
@ -17,4 +19,19 @@ onMounted(() => {
handleThemeStyle(useSettingsStore().theme);
});
});
// 监听租户名称变化,动态更新页面标题
watch(
() => userStore.tenantName,
(value) => {
if (value) {
document.title = userStore.tenantName;
} else {
document.title = import.meta.env.VITE_APP_TITLE;
}
},
{
immediate: true,
}
);
</script>