refactor: (web-ele)优化多个组件的删除操作和确认逻辑

- 将 ElMessageBox 替换为自定义 confirm 函数- 添加全局 loading 功能
- 优化错误处理和消息提示- 调整部分组件属性和样式
This commit is contained in:
lrl
2025-08-01 13:56:55 +08:00
parent c447145d62
commit 38daaa2934
63 changed files with 674 additions and 662 deletions

View File

@@ -4,10 +4,10 @@ import type { MallBrokerageWithdrawApi } from '#/api/mall/trade/brokerage/withdr
import { h } from 'vue';
import { Page, prompt } from '@vben/common-ui';
import { confirm, Page, prompt } from '@vben/common-ui';
import { formatDateTime } from '@vben/utils';
import { ElInput, ElMessage, ElMessageBox } from 'element-plus';
import { ElInput, ElMessage } from 'element-plus';
import { ACTION_ICON, TableAction, useVbenVxeGrid } from '#/adapter/vxe-table';
import {
@@ -35,11 +35,7 @@ function onRefresh() {
/** 审核通过 */
async function handleApprove(row: MallBrokerageWithdrawApi.BrokerageWithdraw) {
await ElMessageBox.confirm('确定要审核通过吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
await confirm('确定要审核通过吗?');
await approveBrokerageWithdraw(row.id);
ElMessage.success($t('ui.actionMessage.operationSuccess'));
onRefresh();
@@ -73,11 +69,7 @@ function handleReject(row: MallBrokerageWithdrawApi.BrokerageWithdraw) {
async function handleRetryTransfer(
row: MallBrokerageWithdrawApi.BrokerageWithdraw,
) {
await ElMessageBox.confirm('确定要重新转账吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
await confirm('确定要重新转账吗?');
await approveBrokerageWithdraw(row.id);
ElMessage.success($t('ui.actionMessage.operationSuccess'));
onRefresh();