<template
                    v-for="(item,index) in info.data"
                    :key="index"
                >
             
          <div class="sub-set" draggable="true" @dragstart="dragstart($event,index)" @dragover="dragover" @drop="drop($event,index)" >

 

 dragstart(event: any, index: number) {
            this.startIndex = index;
        },
        dragover(event: any,) {
            event.preventDefault();
        },
        drop(event: any, index: number) {
            const moveData = this.info.data.splice(this.startIndex, 1) as any;
            this.info.data.splice(index, 0, moveData[0]);
        },

 

posted on 2024-08-28 15:10  北极熊的菜  阅读(3)  评论(0编辑  收藏  举报