refactor: download.ts 使用@vben/utils替换

This commit is contained in:
xingyu4j
2025-04-23 17:22:37 +08:00
parent 84a5002d4a
commit ecf10c0539
24 changed files with 51 additions and 49 deletions

View File

@@ -9,6 +9,7 @@ import { h, ref } from 'vue';
import { Page, useVbenModal } from '@vben/common-ui';
import { Download, Plus } from '@vben/icons';
import { downloadFileFromBlobPart } from '@vben/utils';
import { Button, message, Tabs } from 'ant-design-vue';
@@ -19,7 +20,6 @@ import {
getDemo03StudentPage,
} from '#/api/infra/demo/demo03/erp';
import { $t } from '#/locales';
import { downloadByData } from '#/utils/download';
import { useGridColumns, useGridFormSchema } from './data';
import Demo03CourseList from './modules/demo03-course-list.vue';
@@ -72,7 +72,7 @@ async function onDelete(row: Demo03StudentApi.Demo03Student) {
/** 导出表格 */
async function onExport() {
const data = await exportDemo03Student(await gridApi.formApi.getValues());
downloadByData(data, '学生.xls');
downloadFileFromBlobPart({ fileName: '学生.xls', source: data });
}
/** 表格操作按钮的回调函数 */