调整前端两套互不连通的 HTTP 请求层并存、两套布局框架并存、两套 Pinia 实例并存问题

This commit is contained in:
guanj
2026-07-10 14:52:29 +08:00
parent 888b8d1bf4
commit b3d671a93e
76 changed files with 619 additions and 5514 deletions

11
src/locales/index.ts Normal file
View File

@@ -0,0 +1,11 @@
const localeModules = import.meta.glob<{ default: Record<string, unknown> }>('./*.ts')
export async function loadLocaleMessages(locale: string) {
const path = `./${locale}.ts`
const loader = localeModules[path]
if (!loader) {
throw new Error(`Locale not found: ${locale}`)
}
const mod = await loader()
return mod.default ?? {}
}