this.tableData 数组
index 点击行的索引
top(index, row) {
// 点击上箭头,获取当前行下标
this.tableData.splice(
index,
1,
...this.tableData.splice(index - 1, 1, this.tableData[index])
);
// console.log(this.tableData);
},
// 点击下箭头,获取当前行下标
bottom(index, row) {
// console.log(index, row);
this.tableData.splice(
index,
1,
...this.tableData.splice(index + 1, 1, this.tableData[index])
);
},