From f7a789a19655309e881ad19c4400be69284d7ce3 Mon Sep 17 00:00:00 2001 From: DXC Date: Mon, 13 Apr 2026 09:22:48 +0800 Subject: [PATCH] feat(spec-helper): align frontend interface with new sequence data and display item counts --- .../src/components/SpecHelper/index.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/inventory-web/src/components/SpecHelper/index.vue b/inventory-web/src/components/SpecHelper/index.vue index a06d952..6c38c23 100644 --- a/inventory-web/src/components/SpecHelper/index.vue +++ b/inventory-web/src/components/SpecHelper/index.vue @@ -28,7 +28,10 @@ :key="item.group" class="data-item" > - {{ item.group }} +
+ {{ item.group }} + {{ item.count }}项 +
{{ item.latest }} @@ -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; }