feat: 优化删除确认弹窗逻辑,确保仅在特定条件下显示

This commit is contained in:
傅光孟 2026-03-10 11:42:36 +08:00
parent f41b4ac31b
commit e3a23b8f5e
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@
<el-button type="text" @click="addOpen(scope.row)">编辑</el-button> <el-button type="text" @click="addOpen(scope.row)">编辑</el-button>
<el-button type="text" v-if="scope.row.status === 1" @click="doUpdateStatus(scope.row)">启用</el-button> <el-button type="text" v-if="scope.row.status === 1" @click="doUpdateStatus(scope.row)">启用</el-button>
<el-button type="text" v-else @click="doUpdateStatus(scope.row)">禁用</el-button> <el-button type="text" v-else @click="doUpdateStatus(scope.row)">禁用</el-button>
<el-popconfirm v-if="scope.row.type !== 1" title="请确认是否删除" placement="top" @confirm="doDeleteTenant(scope.row)"> <el-popconfirm title="请确认是否删除" placement="top" @confirm="doDeleteTenant(scope.row)">
<template #reference> <template #reference>
<el-button type="danger" text>删除</el-button> <el-button type="danger" text>删除</el-button>
</template> </template>

View File

@ -64,7 +64,7 @@
<el-button type="text" @click="addOpen(scope.row)">编辑</el-button> <el-button type="text" @click="addOpen(scope.row)">编辑</el-button>
<el-button type="text" v-if="scope.row.status === 1" @click="doUpdateStatus(scope.row)">启用</el-button> <el-button type="text" v-if="scope.row.status === 1" @click="doUpdateStatus(scope.row)">启用</el-button>
<el-button type="text" v-else @click="doUpdateStatus(scope.row)">禁用</el-button> <el-button type="text" v-else @click="doUpdateStatus(scope.row)">禁用</el-button>
<el-popconfirm title="请确认是否删除" placement="top" @confirm="doDeleteTenantUser(scope.row)"> <el-popconfirm v-if="scope.row.type !== 1" title="请确认是否删除" placement="top" @confirm="doDeleteTenantUser(scope.row)">
<template #reference> <template #reference>
<el-button type="danger" text>删除</el-button> <el-button type="danger" text>删除</el-button>
</template> </template>