feat(spec-helper): align frontend interface with new sequence data and display item counts

This commit is contained in:
DXC
2026-04-13 09:22:48 +08:00
parent 6aa2142f01
commit f7a789a196

View File

@ -28,7 +28,10 @@
:key="item.group"
class="data-item"
>
<span class="group-tag">{{ item.group }}</span>
<div class="item-left">
<span class="group-tag">{{ item.group }}</span>
<el-tag size="small" type="info">{{ item.count }}</el-tag>
</div>
<span class="latest-spec">{{ item.latest }}</span>
</div>
<el-empty v-if="filteredData.length === 0" description="暂无数据" :image-size="60" />
@ -46,6 +49,7 @@ import { ElMessage } from 'element-plus'
interface SpecItem {
group: string
latest: string
count: number
}
const expanded = ref(false)
@ -80,8 +84,8 @@ const filteredData = computed(() => {
const keyword = filterText.value.toLowerCase()
return specData.value.filter(
item =>
item.group.toLowerCase().includes(keyword) ||
item.latest.toLowerCase().includes(keyword)
(item.group && item.group.toLowerCase().includes(keyword)) ||
(item.latest && item.latest.toLowerCase().includes(keyword))
)
})
@ -171,6 +175,14 @@ onMounted(() => {
cursor: default;
}
.item-left {
display: flex;
align-items: center;
gap: 6px;
min-width: 0;
flex: 1;
}
.data-item:hover {
background: #f5f7fa;
}