forked from dyf/dyf-vue-ui
修复类型字典问题
This commit is contained in:
17
src/App.vue
17
src/App.vue
@ -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>
|
||||
|
Reference in New Issue
Block a user