javascript - pass dragable v-for option to function when drag is over -
i want drag element list 1 list 2 , call method when leave drag, accomplish it, problem here can put @end(responsable detecting end of dragging) in draggable tag, , div has v-for child it, can't element list pas function in draggable.
this code:
<draggable v-model="sectionlist" class="dragarea" @end="changeview(section.component)" :options="{group:{ name:'sections', pull:'clone', put:false }}"> <transition-group name="list-complete"> <div v-for="(section, index) in sectionlist" @click="changeview(section.component)" :key="section.text" class="card card-color list-complete-item"> <div class="card-block"> <h4 class="card-title text-center">{{section.text}}</h4> </div> </div> </transition-group> </draggable>
the @end=changeview receives parameter, parameter should section.component comes list, element?
thank you
Comments
Post a Comment