From 75d5cf24adefab47af274985cc648dd5e28ca422 Mon Sep 17 00:00:00 2001 From: BarnacleBoy Date: Mon, 18 May 2026 12:49:19 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20useI18nMeta=20=E2=80=94=20remove=20Route?= =?UTF-8?q?Meta=20import,=20fix=20callable=20narrowing,=20fix=20resolveI18?= =?UTF-8?q?nCustomTags=20return=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/vdn-static/src/composables/useI18nMeta.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/vdn-static/src/composables/useI18nMeta.ts b/apps/vdn-static/src/composables/useI18nMeta.ts index 1b17e40..c63dd30 100644 --- a/apps/vdn-static/src/composables/useI18nMeta.ts +++ b/apps/vdn-static/src/composables/useI18nMeta.ts @@ -2,7 +2,7 @@ import { computed, type ComputedRef, type Ref, unref, watch } from 'vue' import { useRoute } from 'vue-router' import { useMeta, type MetaConfig, type LocaleAwareMeta } from './useMeta' import { useLocale, type LocaleId } from '../i18n' -import type { RouteMeta, RouteMetaValue } from '../types/route-meta.d' +import type { RouteMetaValue } from '../types/route-meta.d' /** * Composable for i18n-aware meta tag management @@ -49,7 +49,7 @@ export function useI18nMeta( routeValue: typeof route ): T | undefined => { if (value === undefined) return undefined - return typeof value === 'function' ? value(routeValue) : value + return typeof value === 'function' ? (value as Function)(routeValue) as T : value } /** @@ -158,10 +158,10 @@ function resolveI18nCustomTags( return customTags.map(tag => ({ ...tag, - content: typeof tag.content === 'string' && typeof tag.content === 'object' - ? resolveI18nContent(tag.content as any, currentLocale) || '' - : typeof tag.content === 'function' - ? tag.content + content: typeof tag.content === 'function' + ? '' + : typeof tag.content === 'object' + ? resolveI18nContent(tag.content as any, currentLocale) || '' : tag.content })) }