fix: open modal
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
函数名提出name作为单独配置项传递,第一个参数作为id,最后个参数作为函数名,这样函数的显示名称可以支持转换。
|
||||
|
||||
弹窗事件如果不传递弹窗名字,则不会出现弹窗。
|
||||
|
||||
## 0.9.5
|
||||
|
||||
preview组件scripts加载由并发变为线性。
|
||||
|
@@ -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');
|
||||
|
Reference in New Issue
Block a user