fix: 批量删除问题修复

Former-commit-id: 81be6da082b3eed89104b77f53a34ae2a2e7f60b
This commit is contained in:
haoxr
2023-03-13 23:08:24 +08:00
parent 8baa04362a
commit e1a231d4eb
6 changed files with 40 additions and 34 deletions

View File

@@ -160,13 +160,18 @@ function resetForm() {
/**
* 删除
*/
function handleDelete(roleId: number) {
function handleDelete(roleId?: number) {
const roleIds = [roleId || ids.value].join(',');
if (!roleIds) {
ElMessage.warning('请勾选删除项');
return;
}
ElMessageBox.confirm('确认删除已选中的数据项?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const roleIds = [roleId || ids.value].join(',');
loading.value = true;
deleteRoles(roleIds)
.then(() => {