refactor(i18n): ♻️ 加强基础国际化

This commit is contained in:
cshaptx4869
2024-03-07 23:51:35 +08:00
parent 2c2d638379
commit 26b75db243
10 changed files with 135 additions and 58 deletions

View File

@@ -26,15 +26,8 @@ const type = computed(() => {
});
const linkProps = (to: string) => {
if (isExternalLink.value) {
return {
href: to,
target: "_blank",
rel: "noopener noreferrer",
};
}
return {
to: to,
};
return isExternalLink.value
? { href: to, target: "_blank", rel: "noopener noreferrer" }
: { to };
};
</script>