SortableJS / vue.draggable.next

Vue 3 compatible drag-and-drop component based on Sortable.js
https://sortablejs.github.io/vue.draggable.next/#/simple
MIT License
3.91k stars 531 forks source link

How to use with component and transition #29

Open KnSup opened 3 years ago

KnSup commented 3 years ago

      <draggable
        tag="el-collapse" // want to use both transition-group and el-collapse
        :list="list"
        :component-data="collapseComponentData"
        item-key="id"
      >
        <template #item="{ element }">
          <el-collapse-item :title="element.title" :name="element.id">
            <div v-for="(lign, idx) in element.text" :key="idx">{{ lign }}</div>
          </el-collapse-item>
        </template>
      </draggable>```
xiaoxian521 commented 3 years ago

Refer to this example: https://github.com/xiaoxian521/CURD-TS/blob/main/src/views/components/draggable/index.vue