mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
style(usage): 请求链路节点改回居中布局并修复 TypeScript 兼容性
- 将节点布局从两端对齐改回居中展示 - 将 findLastIndex 替换为向后兼容的 for 循环实现
This commit is contained in:
@@ -677,8 +677,14 @@ watch(groupedTimeline, (newGroups) => {
|
||||
const group = newGroups[i]
|
||||
if (group.primaryStatus === 'failed') {
|
||||
selectedGroupIndex.value = i
|
||||
// 选中最后一个失败的尝试
|
||||
const failedIdx = group.allAttempts.findLastIndex((a: CandidateRecord) => a.status === 'failed')
|
||||
// 选中最后一个失败的尝试(从后往前遍历)
|
||||
let failedIdx = -1
|
||||
for (let j = group.allAttempts.length - 1; j >= 0; j--) {
|
||||
if (group.allAttempts[j].status === 'failed') {
|
||||
failedIdx = j
|
||||
break
|
||||
}
|
||||
}
|
||||
selectedAttemptIndex.value = failedIdx >= 0 ? failedIdx : group.allAttempts.length - 1
|
||||
return
|
||||
}
|
||||
@@ -756,7 +762,7 @@ const getStatusColorClass = (status: string) => {
|
||||
.minimal-track {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
justify-content: center;
|
||||
gap: 64px;
|
||||
padding: 2rem;
|
||||
overflow-x: auto;
|
||||
|
||||
Reference in New Issue
Block a user