grid-layout-plus
grid-layout-plus copied to clipboard
如何实现从一个GridLayout中拖放到另一个GridLayout
尝试过在GridItem移动事件中,删除源GridLayout中的layout数组中的item,再插入到目标GridLayout的layout数组中,但这样会引发handleDrag中的异常:
if (!mouseInGrid) {
let draggingIndex = layoutData.value[0].findIndex(ele => ele.i === itemId)
let removed = layoutData.value[0].splice(draggingIndex, 1)
console.log(layoutData.value[0], removed)
}
大概可以模仿drag-from-outside例子,但先要解决拖少源GridItem时从源数组上删除该项引发异常?
我在这个分支中实现了多网格间移动项目:但不完善