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

@@ -7,6 +7,7 @@ import type { AnalysisOverviewIconItem } from '#/views/mall/home/components/data
import { reactive, ref } from 'vue';
import { confirm } from '@vben/common-ui';
import { EchartsUI, useEcharts } from '@vben/plugins/echarts';
import {
calculateRelativeRate,
@@ -17,7 +18,6 @@ import {
} from '@vben/utils';
import dayjs from 'dayjs';
import { ElMessageBox } from 'element-plus';
import * as TradeStatisticsApi from '#/api/mall/statistics/trade';
import AnalysisChartCard from '#/views/mall/home/components/analysis-chart-card.vue';
@@ -142,7 +142,7 @@ const loadOverview = () => {
const handleExport = async () => {
try {
// 导出的二次确认
await ElMessageBox.confirm('确定要导出交易状况吗?');
await confirm('确定要导出交易状况吗?');
// 发起导出
exportLoading.value = true;
const times = shortcutDateRangePicker.value.times;