mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-12 11:30:07 +08:00
fix: 解决删除失败无法关闭弹窗的BUG
This commit is contained in:
parent
e1f0079585
commit
c6ad2f9a8e
@ -29,20 +29,29 @@ export const useDeleteData = <P = any, R = any>(
|
|||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
instance.confirmButtonLoading = true;
|
instance.confirmButtonLoading = true;
|
||||||
instance.cancelButtonLoading = true;
|
instance.cancelButtonLoading = true;
|
||||||
const res = await api(params);
|
|
||||||
done();
|
await api(params)
|
||||||
if (!res) return reject(false);
|
.then((res) => {
|
||||||
resolve(true);
|
done();
|
||||||
ElMessage({
|
if (!res) return reject(false);
|
||||||
type: 'success',
|
resolve(true);
|
||||||
message: i18n.global.t('commons.msg.operationSuccess'),
|
ElMessage({
|
||||||
});
|
type: 'success',
|
||||||
|
message: i18n.global.t('commons.msg.operationSuccess'),
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
instance.confirmButtonLoading = false;
|
||||||
|
instance.cancelButtonLoading = false;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(() => {})
|
.then(() => {
|
||||||
|
console.log('1111');
|
||||||
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user