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

@@ -4,6 +4,8 @@
函数名提出name作为单独配置项传递第一个参数作为id最后个参数作为函数名这样函数的显示名称可以支持转换。
弹窗事件如果不传递弹窗名字,则不会出现弹窗。
## 0.9.5
preview组件scripts加载由并发变为线性。

View File

@@ -150,8 +150,6 @@ MIT
## Todo
函数部分重构
文档更新
脚手架

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');