mirror of
https://gitee.com/dapppp/ruoyi-plus-vben5.git
synced 2026-03-18 08:38:48 +08:00
refactor: 移除 Modal 组件直接导入,统一使用 window.modal 调用
将项目中直接导入的 antdv-next Modal 组件替换为通过 window.modal 调用,提升代码一致性 删除不再使用的 table-switch.vue 组件
This commit is contained in:
@@ -3,7 +3,7 @@ import type { Rule } from 'antdv-next/es/form';
|
||||
|
||||
import { reactive } from 'vue';
|
||||
|
||||
import { Alert, Form, Input, Modal } from 'antdv-next';
|
||||
import { Alert, Form, Input } from 'antdv-next';
|
||||
import { isFunction } from 'lodash-es';
|
||||
|
||||
export interface ConfirmModalProps extends Omit<ModalFuncProps, 'visible'> {
|
||||
@@ -37,7 +37,7 @@ export function confirmDeleteModal(props: ConfirmModalProps) {
|
||||
const useForm = Form.useForm;
|
||||
const { validate, validateInfos } = useForm(formValue, rulesRef);
|
||||
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
...props,
|
||||
centered: true,
|
||||
content: (
|
||||
|
||||
@@ -5,7 +5,6 @@ import { ref } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
import { Modal } from 'antdv-next';
|
||||
import { isFunction } from 'lodash-es';
|
||||
|
||||
interface BeforeCloseDiffProps {
|
||||
@@ -86,7 +85,7 @@ export function useBeforeCloseDiff(props: BeforeCloseDiffProps) {
|
||||
|
||||
// 数据有变化,显示确认对话框
|
||||
return new Promise<boolean>((resolve) => {
|
||||
Modal.confirm({
|
||||
window.modal.confirm({
|
||||
title: $t('pages.common.tip'),
|
||||
content: $t('pages.common.beforeCloseTip'),
|
||||
centered: true,
|
||||
|
||||
Reference in New Issue
Block a user