<draggable v-model="tags2" :options="dragOptions1">
<transition-group tag="ul" class="list-group">
<li class="list-group-item" v-for="(element, index) in tags2" :key="index">
<!-- {{element.name + index}} -->
<component :is="element.type" :orderNo="index + 1"></component>
</li>
</transition-group>
</draggable>
tags2: [
{
id: 1,
name: "",
type: "textfield"
},
{
id: 2,
name: "",
type: "textfield"
}
]
dragOptions1 () {
return {
group: "haha"
}
}
Why can I write {{element.name + index}} the comments in the above code to sort
but not drag and drop as < component: is= "element.type": orderNo= "index + 1" > < / component >?