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]
|
const group = newGroups[i]
|
||||||
if (group.primaryStatus === 'failed') {
|
if (group.primaryStatus === 'failed') {
|
||||||
selectedGroupIndex.value = i
|
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
|
selectedAttemptIndex.value = failedIdx >= 0 ? failedIdx : group.allAttempts.length - 1
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -756,7 +762,7 @@ const getStatusColorClass = (status: string) => {
|
|||||||
.minimal-track {
|
.minimal-track {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
gap: 64px;
|
gap: 64px;
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
|
|||||||
Reference in New Issue
Block a user