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

@@ -2,13 +2,13 @@
import type { FileType } from 'ant-design-vue/es/upload/interface';
import { useVbenModal } from '@vben/common-ui';
import { downloadFileFromBlobPart } from '@vben/utils';
import { Button, message, Upload } from 'ant-design-vue';
import { useVbenForm } from '#/adapter/form';
import { importUser, importUserTemplate } from '#/api/system/user';
import { $t } from '#/locales';
import { downloadByData } from '#/utils/download';
import { useImportFormSchema } from '../data';
@@ -53,7 +53,7 @@ function beforeUpload(file: FileType) {
/** 下载模版 */
async function onDownload() {
const data = await importUserTemplate();
downloadByData(data, '用户导入模板.xlsx');
downloadFileFromBlobPart({ fileName: '用户导入模板.xls', source: data });
}
</script>