[Vuejs]-How to use draggable in vuejs

0👍

The problem is that you defined your fields: Array and you are using it inside of your v-for there it is correct (if it’s really an array).

But you have also used name fields inside of your dragable v-model. If you will rename this and change everything else inside of your code to the new name it should work out.

So in your case you send your data (fields) from your parent.vue to your child.vue and each time you select something from your dragable it will overwrite your array in the v-for.

So little example:
Array Fields: [Cat, Dog, Mouse] – You are selecting with v-model fields Cat – now your new Array Fields will be overwritten..

Hopefully it’s now clear for you!

Leave a comment