继承
LocaleBase
用法
<Draggable>
<div className="dragitem">
<p style={{ textAlign: 'center' }}>Drag Me</p>
</div>
</Draggable>
<Droppable
onDragEnter={() => this.setState({ isover: true })}
onDragLeave={() => this.setState({ isover: false })}
onDrop={() => this.setState({ dropped: true })}
>
<div className={dropCls}>
<p style={{ textAlign: 'center' }}>Drop here</p>
</div>
</Droppable>
属性
名称 |
类型 |
描述 |
默认 |
scope |
string,array |
放置范围。 |
null |
disabled |
boolean |
为True时禁用调整 |
false |
事件
名称 |
参数 |
描述 |
onDragEnter |
scope |
当可拖动对象被拖动进入时触发。 |
onDragOver |
scope |
当拖动可拖动对象时触发。 |
onDragLeave |
scope |
离开可拖动动对象时触发。 |
onDrop |
scope |
当拖放可拖动对象时触发。 |