## 刪除對應的ID
```
del(id) { // 根據Id刪除數據
// 分析:
// 1. 如何根據Id,找到要刪除這一項的索引
// 2. 如果找到索引了,直接調用 數組的 splice 方法
this.list.some((item, i) \=> {
if (item.id \== id) {
this.list.splice(i, 1)
// 在 數組的 some 方法中,如果 return true,就會立即終止這個數組的后續循環
return true;
}
})
```