🐛 修复表单组件在画布中单机出现交互弹窗的问题,增强体验

This commit is contained in:
xujiang 2020-11-21 16:18:42 +08:00
parent 0c758ddda8
commit 4c378c05f9

View File

@ -36,6 +36,8 @@ const FormComponent = (props: IFormConfig & { isTpl: boolean }) => {
}); });
} }
}; };
const isEditorPage = window.location.pathname.indexOf('editor') > -1;
return ( return (
<> <>
{props.isTpl && ( {props.isTpl && (
@ -50,6 +52,7 @@ const FormComponent = (props: IFormConfig & { isTpl: boolean }) => {
backgroundColor: bgColor, backgroundColor: bgColor,
overflow: 'hidden', overflow: 'hidden',
position: 'absolute', position: 'absolute',
pointerEvents: isEditorPage ? 'none' : 'initial',
}} }}
> >
{title && ( {title && (