mirror of
https://iceshrimp.dev/Crimekillz/jointrashposs.git
synced 2024-11-22 08:53:49 +01:00
parent
32b96c84e7
commit
a9d0237a83
@ -63,13 +63,10 @@ const router = useRouter();
|
||||
const route = useRoute();
|
||||
const path = ref(route.path);
|
||||
|
||||
router.afterEach((to) => {
|
||||
path.value = to.path;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
const _route = useRoute();
|
||||
path.value = _route.path;
|
||||
watch(() => route.path, (to) => {
|
||||
path.value = to;
|
||||
}, {
|
||||
immediate: true,
|
||||
});
|
||||
|
||||
const realLinks = findDeepObject(props.links[0], (v) => {
|
||||
|
@ -100,17 +100,14 @@ const props = withDefaults(defineProps<{
|
||||
const navOpen = ref(false);
|
||||
|
||||
const { locales, locale: currentLocale } = useI18n();
|
||||
const { path } = useRoute();
|
||||
const route = useRoute();
|
||||
const { afterEach, push } = useRouter();
|
||||
const currentPath = ref(path);
|
||||
const currentPath = ref(route.path);
|
||||
|
||||
afterEach((to) => {
|
||||
currentPath.value = to.path;
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
const _route = useRoute();
|
||||
currentPath.value = _route.path;
|
||||
watch(() => route.path,(to) => {
|
||||
currentPath.value = to;
|
||||
}, {
|
||||
immediate: true,
|
||||
});
|
||||
|
||||
const switchLocalePath = useSwitchLocalePath();
|
||||
|
Loading…
Reference in New Issue
Block a user