Files
jinshen-website/app/components/SpecTable.vue
R2m1liA f957adfa5d feat: 完成网站前端的基本建设
- 网站内容展示:首页, 产品页, 解决方案, 联系信息等
- 网站跳转逻辑:通过Vue-Router实现路由跳转
- 后端通信: 通过Nuxt Strapi与后端Strapi服务进行通信
2025-09-06 15:59:52 +08:00

34 lines
983 B
Vue

<template>
<div class="spec-collapse">
<el-collapse v-model="activeName">
<el-collapse-item v-for="item in data" :key="item.title" :title="item.title" :name="item.title">
<el-descriptions :column="1" border>
<el-descriptions-item v-for="subItem in item.items" :key="subItem.label" :label="subItem.label">
{{ subItem.value }}
</el-descriptions-item>
</el-descriptions>
</el-collapse-item>
</el-collapse>
</div>
</template>
<script lang="ts" setup>
const props = defineProps({
data: {
type: Object as () => ProductionSpecGroup[],
required: true
}
})
// 默认全部展开
const activeName = ref<string[]>(props.data.map((item: ProductionSpecGroup) => {
return item.title
}) || [])
</script>
<style scoped>
.spec-collapse ::v-deep(.el-collapse-item__header) {
font-size: 1rem;
padding: 1rem;
}
</style>