Alfred-Skyblue / vue-draggable-plus

Universal Drag-and-Drop Component Supporting both Vue 3 and Vue 2
https://vue-draggable-plus.pages.dev/en/
MIT License
2.72k stars 106 forks source link

自定义克隆时,放置的目标顺序错误 #93

Closed zhifengle closed 4 months ago

zhifengle commented 5 months ago

复现地址: https://stackblitz.com/edit/vitejs-vite-kyt3kp

步骤: 拖拽左侧的 input 到表单,然后在拖拽左侧的 rate 到表单中 input 的下面。rate 会放置在 input 上面。

const onDragAdd = (evt: SortableEvent) => {
  console.log(evt.newIndex)
}

监听 add 事件,打印出的 evt.newIndex 是正确的。

kanocence commented 5 months ago

发现evt.newDraggableIndexevt.newIndex 不一致的时候会出现顺序错误 image

Aaron-zon commented 4 months ago

image 删掉这个,或将下面的列也设置成ul。 这不是自定义克隆的问题,#98

kanocence commented 4 months ago

image 换成div已解决👍👍