优化展示

This commit is contained in:
2025-11-24 14:52:12 +08:00
parent f8f91f0681
commit 3505fcb250

View File

@@ -8,9 +8,9 @@
:highlight-current-row="false" :highlight-current-row="false"
:scrollbar-always-on="true" :scrollbar-always-on="true"
> >
<el-table-column prop="id" label="ID" width="80" /> <el-table-column prop="id" label="ID" width="80"/>
<el-table-column prop="name" label="配方名" min-width="150" /> <el-table-column prop="name" label="配方名" width="120"/>
<el-table-column label="原料种类数" width="180" align="center"> <el-table-column label="原料种类数" align="center" width="150">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.recipe_ingredients ? scope.row.recipe_ingredients.length : 0 }} </span> <span>{{ scope.row.recipe_ingredients ? scope.row.recipe_ingredients.length : 0 }} </span>
<el-button <el-button
@@ -23,7 +23,7 @@
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="description" label="配方简介" min-width="200" /> <el-table-column prop="description" label="配方简介"/>
<el-table-column label="操作" width="150" align="center"> <el-table-column label="操作" width="150" align="center">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="$emit('edit', scope.row)">编辑</el-button> <el-button size="small" @click="$emit('edit', scope.row)">编辑</el-button>