1.安装组件
npm install vuedraggable -S
2.引入组件
完整代码:helloWorld.vue
<template>
<div class="hello">
<el-button @click="getData()">加载数据</el-button>
<table class="dataTabble" v-for="(item,id) in tableData" :key="id">
<thead>
<tr>
<th width="80">序号</th>
<th width="200">地址</th>
</tr>
</thead>
<draggable v-model="item.orders" element="tbody" @update="datadragEnd">
<tr v-for="(val,index) in item.orders" :key="index">
<td>{
{val.num}}</td>
<td>{
{val.address}}</td>