//上移
topStudent(index) {
this.studentData.splice(
index,
1,
...this.studentData.splice(index - 1, 1, this.studentData[index])
);
},
//下移
bottomStudent(index) {
this.studentData.splice(
index + 1,
1,
...this.studentData.splice(index, 1, this.studentData[index + 1])
);
},
网友评论