update 0.3.0

This commit is contained in:
hufeixiong
2021-07-12 21:01:11 +08:00
parent 740d3661d2
commit e18ce0f635
23 changed files with 349 additions and 150 deletions

View File

@@ -61,8 +61,8 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
const ref = useRef<HTMLDivElement>(null);
const innerDragData = useMemo(() => {
return { ...innerDrag(props.data, ref) };
}, [props.data]);
return { ...innerDrag(props.data, ref, props.config) };
}, [props.data, props.config]);
useEffect(() => {
const fn = () => {
@@ -133,7 +133,7 @@ function Blocks(props: PropsWithChildren<BlockProps>) {
{...innerDragData}
onContextMenu={(e) => {
if (props.data.name !== 'modalMask') {
contextMenuEvent(e, ref);
contextMenuEvent(e, ref, props.config);
}
}}
>