feat: 优化仓位管理页面功能和样式
- 添加卡片和列表视图切换功能 - 移动端支持卡片折叠/展开,默认只显示关键信息 - 历史仓位不显示盈亏和平仓收益 - 优化账户筛选:移除搜索功能,按账户名称排序 - 移动端强制使用卡片视图,隐藏视图切换按钮 - 优化侧边栏布局:固定高度,内容区域可滚动 - 优化当前仓位/历史仓位切换组件样式 - 修复账户筛选全部账户选项不生效的问题
This commit is contained in:
@@ -151,3 +151,39 @@ export interface Statistics {
|
||||
maxLoss: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 账户仓位信息
|
||||
*/
|
||||
export interface AccountPosition {
|
||||
accountId: number
|
||||
accountName?: string
|
||||
walletAddress: string
|
||||
proxyAddress: string
|
||||
marketId: string
|
||||
marketTitle?: string
|
||||
marketSlug?: string
|
||||
marketIcon?: string // 市场图标 URL
|
||||
side: string // YES 或 NO
|
||||
quantity: string
|
||||
avgPrice: string
|
||||
currentPrice: string
|
||||
currentValue: string
|
||||
initialValue: string
|
||||
pnl: string
|
||||
percentPnl: string
|
||||
realizedPnl?: string
|
||||
percentRealizedPnl?: string
|
||||
redeemable: boolean
|
||||
mergeable: boolean
|
||||
endDate?: string
|
||||
isCurrent: boolean // true: 当前仓位(有持仓),false: 历史仓位(已平仓)
|
||||
}
|
||||
|
||||
/**
|
||||
* 仓位列表响应
|
||||
*/
|
||||
export interface PositionListResponse {
|
||||
currentPositions: AccountPosition[]
|
||||
historyPositions: AccountPosition[]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user