forked from wangziqi/gongxue-base
fix: replace deprecated antd APIs (Drawer width→size, Modal destroyOnClose→destroyOnHidden)
This commit is contained in:
@@ -233,7 +233,7 @@ const MainLayout: React.FC = () => {
|
||||
placement="left"
|
||||
open={drawerOpen}
|
||||
onClose={() => setDrawerOpen(false)}
|
||||
width={240}
|
||||
size={240}
|
||||
styles={{ body: { padding: 0 } }}
|
||||
title="恭学教育基地"
|
||||
>
|
||||
|
||||
@@ -236,7 +236,7 @@ const RolesPage: React.FC = () => {
|
||||
onOk={handleSubmit}
|
||||
onCancel={() => setModalOpen(false)}
|
||||
width={700}
|
||||
destroyOnClose
|
||||
destroyOnHidden
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
<Form.Item
|
||||
|
||||
@@ -476,7 +476,7 @@ const SchedulesPage: React.FC = () => {
|
||||
: null // no footer for detail mode
|
||||
}
|
||||
width={600}
|
||||
destroyOnClose
|
||||
destroyOnHidden
|
||||
>
|
||||
{modalMode === 'create' ? (
|
||||
<Form form={form} layout="vertical" style={{ marginTop: 16 }}>
|
||||
|
||||
@@ -227,7 +227,7 @@ const UsersPage: React.FC = () => {
|
||||
open={modalOpen}
|
||||
onOk={handleSubmit}
|
||||
onCancel={() => setModalOpen(false)}
|
||||
destroyOnClose
|
||||
destroyOnHidden
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
<Form.Item
|
||||
@@ -278,7 +278,7 @@ const UsersPage: React.FC = () => {
|
||||
open={pwdModalOpen}
|
||||
onOk={handlePwdSubmit}
|
||||
onCancel={() => setPwdModalOpen(false)}
|
||||
destroyOnClose
|
||||
destroyOnHidden
|
||||
>
|
||||
<Form form={pwdForm} layout="vertical">
|
||||
<Form.Item
|
||||
|
||||
Reference in New Issue
Block a user