commit
cd8302d5be
4 changed files with 36 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<Table ref="currentRowTable" :columns="columns3" :data="data1"></Table>
|
||||
<Table ref="currentRowTable" :columns="columns3" :data="data1" :draggable="true" @on-drag-drop="onDragDrop"></Table>
|
||||
<Button @click="handleClearCurrentRow">Clear</Button>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -62,6 +62,10 @@
|
|||
methods: {
|
||||
handleClearCurrentRow () {
|
||||
this.$refs.currentRowTable.clearCurrentRow();
|
||||
},
|
||||
onDragDrop(a,b){
|
||||
console.log(a,b);
|
||||
this.data1.splice(b,1,...this.data1.splice(a, 1 , this.data1[b]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue