fix: open modal

This commit is contained in:
hufeixiong
2021-11-05 09:27:04 +08:00
parent 79efa6e15a
commit c47edfcc44
3 changed files with 5 additions and 3 deletions

View File

@@ -30,7 +30,6 @@ export function ModalRender(props: ModalRenderProps) {
const { parentDom, rootDom } = props;
const modalConfig = props.data.modalConfig[props.name];
//这里还要添加个关闭函数,
const unmount = useMemo(() => {
return () => {
@@ -81,6 +80,9 @@ export const createModal = (name: string, data: IStoreData, config: UserConfig)
if (wrap) {
wrap = null;
}
if (!name) {
return;
}
if (!wrap) {
wrap = document.createElement('div');