提交 89623aef 作者: ZhangLingKun

功能:代码优化

上级 be26c949
...@@ -73,6 +73,9 @@ const SelectMapModal: FC<propType> = (props) => { ...@@ -73,6 +73,9 @@ const SelectMapModal: FC<propType> = (props) => {
// componentDidMount // componentDidMount
useEffect(() => { useEffect(() => {
if (!open) return; if (!open) return;
return () => {
setPosition(undefined);
};
}, [open]); }, [open]);
return ( return (
<Modal open={open} title={title} onCancel={handleCancel} onOk={handleOk} destroyOnClose> <Modal open={open} title={title} onCancel={handleCancel} onOk={handleOk} destroyOnClose>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论