mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-02 18:28:40 +08:00
fixed: (update pageTitle when change local) (#1278)
If AppLocalePicker reload prop is false, Should be updated when changing the language
This commit is contained in:
parent
a530ec867b
commit
b653412260
@ -3,6 +3,7 @@ import { useI18n } from '/@/hooks/web/useI18n';
|
||||
import { useTitle as usePageTitle } from '@vueuse/core';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useLocaleStore } from '/@/store/modules/locale';
|
||||
|
||||
import { REDIRECT_NAME } from '/@/router/constant';
|
||||
|
||||
@ -13,11 +14,12 @@ export function useTitle() {
|
||||
const { title } = useGlobSetting();
|
||||
const { t } = useI18n();
|
||||
const { currentRoute } = useRouter();
|
||||
const localeStore = useLocaleStore();
|
||||
|
||||
const pageTitle = usePageTitle();
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.path,
|
||||
[() => currentRoute.value.path, () => localeStore.getLocale],
|
||||
() => {
|
||||
const route = unref(currentRoute);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user