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