feat: 耗材分组
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user