From f2ef9548212b76390e90ea601d97a691b96cbf65 Mon Sep 17 00:00:00 2001 From: Pan Date: Wed, 16 Jan 2019 10:17:40 +0800 Subject: [PATCH] fix bug --- src/components/DndList/index.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/DndList/index.vue b/src/components/DndList/index.vue index da4afb82..7587daa7 100644 --- a/src/components/DndList/index.vue +++ b/src/components/DndList/index.vue @@ -80,6 +80,13 @@ export default { } }, pushEle(ele) { + for (const item of this.list2) { + if (item.id === ele.id) { + const index = this.list2.indexOf(item) + this.list2.splice(index, 1) + break + } + } if (this.isNotInList1(ele)) { this.list1.push(ele) }