Ama*_*mes 12 javascript reactjs
<div className="kat-project-user-timeline-drag-indicator-wrapper-bottom"
onDrag={(event) => {this.dragTask(event)}}>
</div>
dragTask(event) {
console.log("logic goes here")
}
Run Code Online (Sandbox Code Playgroud)
第一次没有调用该函数.但从第二次起,它工作正常.我尝试使用,event.preventDefault(),但它仍然无法正常工作.
Hat*_*ber 20
尝试添加draggable="true",看看是否有效:
<div draggable="true" className="kat-project-user-timeline-drag-indicator-wrapper-bottom"
onDrag={(event) => {this.dragTask(event)}}>
</div>
dragTask(event) {
console.log("logic goes here")
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7663 次 |
| 最近记录: |