refactor(antd): 替换 Modal destroyOnClose 为 destroyOnHidden
antd 新版本将 destroyOnClose 重命名为 destroyOnHidden, 消除控制台废弃警告。涉及 user、menu、notify、dict、config 页面。
This commit is contained in:
@@ -43,7 +43,7 @@ export default function UserManagement() {
|
||||
try {
|
||||
const res = await roleApi.getAll()
|
||||
setRoles(Array.isArray(res) ? res : [])
|
||||
} catch {}
|
||||
} catch { /* ignored */ }
|
||||
}
|
||||
|
||||
function handleAdd() {
|
||||
@@ -88,7 +88,7 @@ export default function UserManagement() {
|
||||
}
|
||||
setModalOpen(false)
|
||||
loadUsers()
|
||||
} catch {}
|
||||
} catch { /* ignored */ }
|
||||
}
|
||||
|
||||
const columns: ColumnsType<User> = [
|
||||
@@ -161,7 +161,7 @@ export default function UserManagement() {
|
||||
open={modalOpen}
|
||||
onOk={handleSubmit}
|
||||
onCancel={() => setModalOpen(false)}
|
||||
destroyOnClose
|
||||
destroyOnHidden
|
||||
>
|
||||
<Form form={form} layout="vertical">
|
||||
{!editingUser && (
|
||||
|
||||
Reference in New Issue
Block a user