一个实现拖拽的函数 2021-06-13 技术文章 36 字 js code//只通过几个函数实现图片拖拽 let getElementDrags = el => el.mouseDowns.map(mouseDown => document.mouseMoves.takeUntil(document.mouseUps) ) .concatAll() getElementDrags(div).forEach(position => { img.position = position; });