组件拖拽规则类型

interface IComponentDndRules {
    canDrag?: (() => boolean);
    canDrop?: ((targetName: string) => boolean);
    canMoveIn?: ((incomingName: string) => boolean);
    canMoveOut?: ((outgoingName: string) => boolean);
    childrenContainerSelector?: string;
}

Properties

canDrag?: (() => boolean)

当前节点是否可以被拖拽

canDrop?: ((targetName: string) => boolean)

当前节点是否可以拖拽到目标节点中

canMoveIn?: ((incomingName: string) => boolean)

进来的节点是否可以落进来,仅适用于容器节点

canMoveOut?: ((outgoingName: string) => boolean)

被拖拽的节点是否可以被拖离当前节点,仅适用于容器节点

childrenContainerSelector?: string

子节点的容器选择器,用于快速定位子节点容器,适合组件存在多个可搭建区域时使用