refactor: move DndCtext into common dir

This commit is contained in:
semmy 2022-02-07 11:16:54 +08:00
parent 37c01614f2
commit aa78a7faf1
2 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import { DndContext as DndKitContext, DragEndEvent } from '@dnd-kit/core'; import { DndContext as DndKitContext, DragEndEvent } from '@dnd-kit/core';
import { observer } from '@formily/react'; import { observer } from '@formily/react';
import React from 'react'; import React from 'react';
import { createDesignable, useDesignable } from '../..'; import { createDesignable, useDesignable } from '../../hooks';
const useDragEnd = () => { const useDragEnd = () => {
const { refresh } = useDesignable(); const { refresh } = useDesignable();
@ -30,7 +30,7 @@ const useDragEnd = () => {
} }
if (insertAdjacent) { if (insertAdjacent) {
console.log('removeIfChildrenEmpty', activeSchema) console.log('removeIfChildrenEmpty', activeSchema);
dn.insertAdjacent(insertAdjacent, activeSchema, { dn.insertAdjacent(insertAdjacent, activeSchema, {
wrap: wrapSchema, wrap: wrapSchema,
removeEmptyParents: true, removeEmptyParents: true,