// 上移
moveUp(row,index) {
var list = this.tbody
if (index != 0) {
list[index] = list.splice(index - 1, 1, list[index])[0];
} else {
list.push(list.shift());
}
},
// 下移
moveDown(row) {
var list = this.tbody
if (index != list.length - 1) {
list[index] = list.splice(index + 1, 1, list[index])[0];
} else {
list.unshift(list.splice(index, 1)[0]);
}
},
js上移,下移
最新推荐文章于 2024-01-30 16:46:38 发布