mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-28 04:43:22 +08:00
refactor: 重构导出功能,使用新的 useBlobExport 钩子
移除旧的 commonDownloadExcel 函数,统一使用 useBlobExport 钩子处理文件导出 - 在用户导入模板、请假申请和字典类型页面中替换导出逻辑 - 移除 demo 页面未使用的导出按钮和相关导入 - 为导出按钮添加加载状态,提升用户体验
This commit is contained in:
@@ -12,9 +12,8 @@ import { getPopupContainer } from '@vben/utils';
|
||||
import { Popconfirm, Space } from 'antdv-next';
|
||||
|
||||
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
import { demoExport, demoList, demoRemove } from './api';
|
||||
import { demoList, demoRemove } from './api';
|
||||
import { columns, querySchema } from './data';
|
||||
import demoModal from './demo-modal.vue';
|
||||
|
||||
@@ -105,18 +104,6 @@ function handleMultiDelete() {
|
||||
</template>
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
v-access:code="['system:demo:export']"
|
||||
@click="
|
||||
commonDownloadExcel(
|
||||
demoExport,
|
||||
'测试单数据',
|
||||
tableApi.formApi.form.values,
|
||||
)
|
||||
"
|
||||
>
|
||||
{{ $t('pages.common.export') }}
|
||||
</a-button>
|
||||
<a-button
|
||||
:disabled="!vxeCheckboxChecked(tableApi)"
|
||||
danger
|
||||
|
||||
Reference in New Issue
Block a user