diff --git a/src/components/DndList/index.vue b/src/components/DndList/index.vue
index 43e0bb28..da4afb82 100644
--- a/src/components/DndList/index.vue
+++ b/src/components/DndList/index.vue
@@ -4,7 +4,7 @@
{{ list1Title }}
-
[{{ element.author }}] {{ element.title }}
+
{{ element.id }}[{{ element.author }}] {{ element.title }}
@@ -15,9 +15,9 @@
{{ list2Title }}
-
-
-
[{{ element.author }}] {{ element.title }}
+
+
+
{{ element.id }} [{{ element.author }}] {{ element.title }}
@@ -60,16 +60,6 @@ export default {
default: '48%'
}
},
- computed: {
- filterList2() {
- return this.list2.filter(v => {
- if (this.isNotInList1(v)) {
- return v
- }
- return false
- })
- }
- },
methods: {
isNotInList1(v) {
return this.list1.every(k => v.id !== k.id)
@@ -90,7 +80,9 @@ export default {
}
},
pushEle(ele) {
- this.list1.push(ele)
+ if (this.isNotInList1(ele)) {
+ this.list1.push(ele)
+ }
}
}
}