feat: 重构战报弹窗与模拟器视图,优化UI与逻辑

重构BattleReportDialog和BattleSimulatorView相关静态资源,替换旧版JS/CSS文件,提升界面一致性和交互体验。新增和优化空状态、滚动区域等通用UI组件,移除部分冗余composable,完善多语言内容。引入导弹逻辑,补充版本检测工具,提升整体代码结构和可维护性。
This commit is contained in:
谦君
2025-12-15 20:04:40 +08:00
parent 9b9fda0400
commit 59dd7bfd05
126 changed files with 3944 additions and 1487 deletions

View File

@@ -10,7 +10,7 @@ export const useI18n = () => {
const messages = computed(() => locales[currentLocale.value])
// 获取翻译文本的辅助函数
const t = (key: string): string => {
const t = (key: string, params?: Record<string, string | number>): string => {
const keys = key.split('.')
let value: any = messages.value
@@ -22,7 +22,16 @@ export const useI18n = () => {
}
}
return typeof value === 'string' ? value : key
let result = typeof value === 'string' ? value : key
// 替换参数占位符
if (params) {
Object.entries(params).forEach(([paramKey, paramValue]) => {
result = result.replace(new RegExp(`\\{${paramKey}\\}`, 'g'), String(paramValue))
})
}
return result
}
const setLocale = (locale: Locale) => {