js数组实现上移下移
up(index) { if(index === 0) { return } //在上一项插入该项 this.list.splice(index - 1, 0, (this.list[index])) //删除后一项 this.list.splice(index + 1, 1) this.save(); }, down(index) { if (index === (this.list.length-1)) { return } // 在下一项插入该项 this.list.splice(index + 2, 0, (this.list[index])) // 删除前一项 this.list.splice(index, 1) this.save(); },