fix: 优化回测功能UI和修复问题
## 主要修改 ### UI 优化 - 将回测功能移到跟单交易菜单下作为子菜单 - 创建回测改为使用 Modal 方式(移除独立页面) - 优化导航路径,使用 useNavigate 替代 window.location.href ### 功能修复 - 修复 API 路径问题:移除重复的 /api 前缀(/api/backtest -> /backtest) - 修复 copyRatio 输入框单位:改为百分比输入(100 表示 100%),与跟单配置保持一致 - 修复回测列表中 leader 列显示为空的问题:优先显示 leaderName,为空时显示 leaderAddress ### 多语言完善 - 补充缺失的多语言 key: - common.ascending / common.descending / common.day - backtest.sortBy / backtest.sortOrder / backtest.createdAt - backtest.copyRatioTooltip / backtest.copyRatioPlaceholder - 以及其他表单验证相关的 key - 为中文简体、中文繁体、英文三种语言都添加了完整的翻译 ## 修改的文件 - frontend/src/App.tsx - 移除 BacktestCreate 路由 - frontend/src/components/Layout.tsx - 调整菜单结构 - frontend/src/pages/BacktestList.tsx - Modal 创建、修复 leader 显示 - frontend/src/pages/BacktestDetail.tsx - 优化导航 - frontend/src/pages/BacktestCreate.tsx - 同步 copyRatio 修改 - frontend/src/services/api.ts - 修复 API 路径 - frontend/src/locales/* - 补充多语言配置
This commit is contained in:
@@ -34,7 +34,10 @@
|
||||
"previous": "上一頁",
|
||||
"next": "下一頁",
|
||||
"page": "頁",
|
||||
"pageOf": "第"
|
||||
"pageOf": "第",
|
||||
"ascending": "升序",
|
||||
"descending": "降序",
|
||||
"day": "天"
|
||||
},
|
||||
"account": {
|
||||
"title": "賬戶管理",
|
||||
@@ -1326,6 +1329,25 @@
|
||||
"starting": "啟動中...",
|
||||
"stopping": "停止中...",
|
||||
"errorOccurred": "發生錯誤",
|
||||
"retry": "重試"
|
||||
"retry": "重試",
|
||||
"taskNameRequired": "請輸入任務名稱",
|
||||
"leaderRequired": "請選擇 Leader",
|
||||
"initialBalanceRequired": "請輸入初始資金",
|
||||
"initialBalanceInvalid": "初始資金必須大於 0",
|
||||
"backtestDaysRequired": "請輸入回測天數",
|
||||
"backtestDaysInvalid": "回測天數必須在 1-15 之間",
|
||||
"copyRatioRequired": "請輸入跟單比例",
|
||||
"copyRatioInvalid": "跟單比例必須在 0.01-10000 之間",
|
||||
"copyRatioPlaceholder": "例如:100 表示 100%(1:1 跟單),預設 100%",
|
||||
"copyRatioTooltip": "跟單比例表示跟單金額相對於 Leader 訂單金額的百分比。例如:100% 表示 1:1 跟單,50% 表示半倉跟單,200% 表示雙倍跟單",
|
||||
"fixedAmountRequired": "請輸入固定金額",
|
||||
"fixedAmountInvalid": "固定金額必須大於 0",
|
||||
"advancedFilters": "進階過濾",
|
||||
"keywordsPlaceholder": "請輸入關鍵字,按回車添加",
|
||||
"delaySecondsHint": "延遲執行模擬真實跟單延遲",
|
||||
"supportSellHint": "是否跟隨 Leader 的賣出操作",
|
||||
"sortBy": "排序欄位",
|
||||
"sortOrder": "排序順序",
|
||||
"createdAt": "創建時間"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user