1111
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
<div class="stats-header">
|
||||
<div>
|
||||
<h2 class="page-title">统计报表</h2>
|
||||
<p class="sub-title">ECharts 可视化报表</p>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
<t-select v-model="period" :options="periodOptions" style="width: 140px" />
|
||||
|
||||
@@ -17,9 +17,11 @@
|
||||
<t-button size="small" variant="text" @click="openEdit(pet)">
|
||||
<t-icon name="edit" />
|
||||
</t-button>
|
||||
<t-button size="small" variant="text" theme="danger" @click="confirmDelete(pet)">
|
||||
<t-icon name="delete" />
|
||||
</t-button>
|
||||
<t-popconfirm :content="`确定要删除 ${pet.name} 吗?`" @confirm="remove(pet.id)">
|
||||
<t-button size="small" variant="text" theme="danger">
|
||||
<t-icon name="delete" />
|
||||
</t-button>
|
||||
</t-popconfirm>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pet-body">
|
||||
@@ -150,12 +152,6 @@ const openEdit = (pet: any) => {
|
||||
dialogVisible.value = true;
|
||||
};
|
||||
|
||||
const confirmDelete = (pet: any) => {
|
||||
MessagePlugin.confirm(`确定要删除 ${pet.name} 吗?`, '确认删除', {
|
||||
onConfirm: () => remove(pet.id)
|
||||
});
|
||||
};
|
||||
|
||||
const remove = async (id: number) => {
|
||||
try {
|
||||
const res = await api.deletePet(id);
|
||||
|
||||
Reference in New Issue
Block a user