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;
}