feat(spec-helper): align frontend interface with new sequence data and display item counts
This commit is contained in:
@ -28,7 +28,10 @@
|
||||
:key="item.group"
|
||||
class="data-item"
|
||||
>
|
||||
<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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user