fix proseA

This commit is contained in:
kakkokari-gtyih 2023-12-25 00:57:53 +09:00
parent 3702abba19
commit e4c8e16cf4
2 changed files with 6 additions and 5 deletions

View File

@ -28,9 +28,10 @@ const url = new $URL(realHref.value);
if (isLocalPath(realHref.value)) {
//
const route = resolve(realHref.value);
if (route.name && !route.name.toString().includes('___')) {
//
if (/^\/[a-z]{2}\//.test(realHref.value)) {
realHref.value = sanitizeInternalPath(url.fullpath);
} else {
//
realHref.value = sanitizeInternalPath(localePath(url.fullpath));
}
@ -44,7 +45,7 @@ if (isLocalPath(realHref.value)) {
</script>
<template>
<GNuxtLink :to="realHref" :target="realTarget">
<GNuxtLink :href="realHref" :target="realTarget">
<slot></slot>
<MiIco v-if="realHref.startsWith('x-mi-web://')" class="text-xs mx-1" />
<ExtIco v-else-if="realTarget === '_blank'" class="text-xs mx-1" />

View File

@ -4,7 +4,7 @@ export function useGAsyncData<ResT, DataE = Error, DataT = ResT, PickKeys extend
if (!params[2]) {
params[2] = {};
}
params[2].getCachedData = (key) => useNuxtData(key).data.value ?? null;
params[2].getCachedData = (key) => useNuxtData(key).data.value ?? undefined;
return useAsyncData<ResT, DataE, DataT, PickKeys, DefaultT>(...params);
}