mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-18 09:48:50 +08:00
refactor(antdv-next): 将message组件调用统一改为window.message
将项目中直接导入的antdv-next的message组件调用改为通过window.message调用,提升代码一致性 移除不再需要的message组件导入 新增api-switch组件用于统一处理状态切换逻辑
This commit is contained in:
@@ -3,7 +3,6 @@ import type { VbenFormProps } from '#/adapter/form';
|
||||
import { $t } from '@vben/locales';
|
||||
import { cloneDeep, formatDate } from '@vben/utils';
|
||||
|
||||
import { message } from 'antdv-next';
|
||||
import { isFunction } from 'lodash-es';
|
||||
|
||||
import { dataURLtoBlob, urlToBase64 } from './base64Conver';
|
||||
@@ -26,7 +25,10 @@ export async function downloadExcel(
|
||||
requestData: any = {},
|
||||
withRandomName = true,
|
||||
) {
|
||||
const hideLoading = message.loading($t('pages.common.downloadLoading'), 0);
|
||||
const hideLoading = window.message.loading(
|
||||
$t('pages.common.downloadLoading'),
|
||||
0,
|
||||
);
|
||||
try {
|
||||
const data = await func(requestData);
|
||||
downloadExcelFile(data, fileName, withRandomName);
|
||||
@@ -114,7 +116,10 @@ export async function commonDownloadExcel(
|
||||
requestData: any = {},
|
||||
options: DownloadExcelOptions = {},
|
||||
) {
|
||||
const hideLoading = message.loading($t('pages.common.downloadLoading'), 0);
|
||||
const hideLoading = window.message.loading(
|
||||
$t('pages.common.downloadLoading'),
|
||||
0,
|
||||
);
|
||||
try {
|
||||
const { withRandomName = true, fieldMappingTime } = options;
|
||||
// 需要处理时间字段映射
|
||||
|
||||
Reference in New Issue
Block a user