fix:优化modal组件
This commit is contained in:
parent
b1e639e2a8
commit
fd12b053cb
@ -1,9 +1,12 @@
|
||||
import { MyButtons } from '@/common';
|
||||
import { Modal } from 'antd';
|
||||
import { useState } from 'react';
|
||||
import { useImperativeHandle, useState } from 'react';
|
||||
|
||||
export function MyModal(props?: any) {
|
||||
export function MyModal(props?: any,ref?:any) {
|
||||
const [open, setOpen] = useState(false);
|
||||
useImperativeHandle(ref,()=>({
|
||||
close: () => setOpen(false)
|
||||
}))
|
||||
return (
|
||||
<>
|
||||
{props?.trigger ? (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user