全局dialog变宽变高

This commit is contained in:
linxd
2025-08-11 11:06:46 +08:00
parent d882e9bd55
commit 00125c12dc
5 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1 @@
如果引用时在 modal 中 , 渲染报错需要再 modal 组件中添加 forceRender destroyOnClose 属性

View File

@ -5,6 +5,7 @@ import { PlusOutlined, DeleteOutlined, ExclamationCircleOutlined, EditOutlined }
import { getCategoryList, getAllCategories, addCategory, updateCategory, deleteCategory,getCategoryDetail } from '@/servers/api/friendLink'; import { getCategoryList, getAllCategories, addCategory, updateCategory, deleteCategory,getCategoryDetail } from '@/servers/api/friendLink';
import { useFriendLinkDict } from '@/dicts/friendLinkDict'; import { useFriendLinkDict } from '@/dicts/friendLinkDict';
import styles from './friendLinkManage.less'; import styles from './friendLinkManage.less';
import uiconfig from '@/uiconfig';
const { Option } = Select; const { Option } = Select;
const { TextArea } = Input; const { TextArea } = Input;
@ -241,6 +242,7 @@ const FriendLinkCategory: React.FC = () => {
: intl.formatMessage({ id: 'friendLink.category.form.title.add' }) : intl.formatMessage({ id: 'friendLink.category.form.title.add' })
} }
open={modalVisible} open={modalVisible}
width={uiconfig.Modal.width}
onOk={handleModalSubmit} onOk={handleModalSubmit}
onCancel={() => setModalVisible(false)} onCancel={() => setModalVisible(false)}
destroyOnClose destroyOnClose

View File

@ -19,6 +19,7 @@ import {
} from '@/servers/api/friendLink'; } from '@/servers/api/friendLink';
import { LinkStatusMap } from '@/dicts/friendLinkDict'; import { LinkStatusMap } from '@/dicts/friendLinkDict';
import FileUpload from '@/components/FileUpload'; import FileUpload from '@/components/FileUpload';
import uiconfig from '@/uiconfig';
import styles from './friendLinkManage.less'; import styles from './friendLinkManage.less';
// 搜索参数类型 // 搜索参数类型
interface SearchParams { interface SearchParams {
@ -469,6 +470,7 @@ const FriendLinkManage: React.FC = () => {
} }
open={modalVisible} open={modalVisible}
onOk={handleModalSubmit} onOk={handleModalSubmit}
width={uiconfig.Modal.width}
onCancel={() => setModalVisible(false)} onCancel={() => setModalVisible(false)}
destroyOnClose destroyOnClose
> >

View File

@ -7,6 +7,7 @@ import {
ExclamationCircleOutlined, ExclamationCircleOutlined,
SearchOutlined, SearchOutlined,
} from '@ant-design/icons'; } from '@ant-design/icons';
import uiconfig from '@/uiconfig';
import styles from './helpManage.less'; import styles from './helpManage.less';
// 引入API // 引入API
import { import {
@ -525,7 +526,7 @@ const HelpManage: React.FC = () => {
open={modalVisible} open={modalVisible}
onCancel={handleModalCancel} onCancel={handleModalCancel}
footer={null} footer={null}
width={800} width={uiconfig.Modal.width}
destroyOnClose destroyOnClose
maskClosable={false} maskClosable={false}
> >

View File

@ -17,6 +17,7 @@ import {
TopStatusColor TopStatusColor
} from '@/dicts/userQuestionDict'; } from '@/dicts/userQuestionDict';
import type { DictItem } from '@/servers/api/dicts'; import type { DictItem } from '@/servers/api/dicts';
import uiconfig from '@/uiconfig';
const { TextArea } = Input; const { TextArea } = Input;
@ -362,7 +363,7 @@ const QuestionModal: React.FC<QuestionModalProps> = ({
title={getModalTitle()} title={getModalTitle()}
open={open} open={open}
onCancel={onCancel} onCancel={onCancel}
width={800} width={uiconfig.Modal.width}
footer={renderFooter()} footer={renderFooter()}
maskClosable={false} maskClosable={false}
destroyOnClose destroyOnClose