医生常用语模板维护->后端接口优化,页面开发;检查方法,部位新增编辑按钮。
This commit is contained in:
@@ -328,15 +328,18 @@
|
||||
</template>
|
||||
</td>
|
||||
<td class="actions">
|
||||
<template v-if="item.actions">
|
||||
<template v-if="item.editing">
|
||||
<button class="btn btn-confirm" @click.stop="handleConfirm(index)">
|
||||
✓
|
||||
</button>
|
||||
<button class="btn btn-delete" @click.stop="handleDelete(index)">
|
||||
🗑
|
||||
<button class="btn btn-cancel" @click.stop="handleCancelEdit(index)">
|
||||
✕
|
||||
</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<button class="btn btn-edit" @click.stop="handleEdit(index)">
|
||||
✏️
|
||||
</button>
|
||||
<button class="btn btn-confirm" @click.stop="handleConfirm(index)">
|
||||
✓
|
||||
</button>
|
||||
@@ -511,15 +514,18 @@
|
||||
</template>
|
||||
</td>
|
||||
<td class="actions">
|
||||
<template v-if="item.actions">
|
||||
<template v-if="item.editing">
|
||||
<button class="btn btn-confirm" @click.stop="handleConfirm(index)">
|
||||
✓
|
||||
</button>
|
||||
<button class="btn btn-delete" @click.stop="handleDelete(index)">
|
||||
🗑
|
||||
<button class="btn btn-cancel" @click.stop="handleCancelEdit(index)">
|
||||
✕
|
||||
</button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<button class="btn btn-edit" @click.stop="handleEdit(index)">
|
||||
✏️
|
||||
</button>
|
||||
<button class="btn btn-confirm" @click.stop="handleConfirm(index)">
|
||||
✓
|
||||
</button>
|
||||
@@ -936,6 +942,12 @@ function handleEdit(index) {
|
||||
item.editing = true;
|
||||
}
|
||||
|
||||
// 处理取消编辑按钮点击
|
||||
function handleCancelEdit(index) {
|
||||
const item = tableData.value[index];
|
||||
item.editing = false;
|
||||
}
|
||||
|
||||
// 处理确认按钮点击
|
||||
async function handleConfirm(index) {
|
||||
const item = tableData.value[index];
|
||||
|
||||
Reference in New Issue
Block a user