perf: 使用封装的 confirm 替换 Modal.confirm
This commit is contained in:
@@ -5,10 +5,11 @@ import type {
|
||||
} from '#/adapter/vxe-table';
|
||||
import type { InfraFileConfigApi } from '#/api/infra/file-config';
|
||||
|
||||
import { Page, useVbenModal } from '@vben/common-ui';
|
||||
import { confirm, Page, useVbenModal } from '@vben/common-ui';
|
||||
import { Plus } from '@vben/icons';
|
||||
import { openWindow } from '@vben/utils';
|
||||
|
||||
import { Button, message, Modal } from 'ant-design-vue';
|
||||
import { Button, message } from 'ant-design-vue';
|
||||
|
||||
import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
||||
import {
|
||||
@@ -72,14 +73,13 @@ async function onTest(row: InfraFileConfigApi.FileConfig) {
|
||||
const response = await testFileConfig(row.id as number);
|
||||
hideLoading();
|
||||
// 确认是否访问该文件
|
||||
Modal.confirm({
|
||||
confirm({
|
||||
title: '测试上传成功',
|
||||
content: '是否要访问该文件?',
|
||||
okText: '访问',
|
||||
confirmText: '访问',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
window.open(response, '_blank');
|
||||
},
|
||||
}).then(() => {
|
||||
openWindow(response);
|
||||
});
|
||||
} catch {
|
||||
hideLoading();
|
||||
|
||||
Reference in New Issue
Block a user