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(); },