feat: 耗材分组

This commit is contained in:
duan
2025-02-27 18:07:41 +08:00
parent b140b6c662
commit d4b5164f79
10 changed files with 339 additions and 12 deletions

View File

@@ -1,10 +1,10 @@
<template>
<div style="margin-top: 10px;">
<el-table :data="props.list" border style="width: 100%">
<el-table-column prop="date" label="Date" width="180" />
<el-table-column prop="name" label="Name" width="180" />
<el-table-column prop="address" label="Address" />
<el-table-column label="操作">
<el-table-column prop="date" align="center" label="Date" width="180" />
<el-table-column prop="name" align="center" label="Name" width="180" />
<el-table-column prop="address" align="center" label="Address" />
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button size="small" type="primary" link icon="Edit" @click="handleEdit(scope.row)">编辑</el-button>
<el-button size="small" type="danger" link icon="Delete" style="color: #f89797;"
@@ -16,7 +16,7 @@
</template>
<script setup>
const emit = defineEmits(['handleDelete'])
const emit = defineEmits(['handleDelete', 'handleEdit'])
const props = defineProps({
list: {
type: Array,
@@ -27,7 +27,7 @@ const props = defineProps({
function handleEdit(row) {
emit('handleEdit', row)
}
async function handleDelete(index, row) {
function handleDelete(index, row) {
emit('handleDelete', row.id)
}