let index = this.options.findIndex(item=> item.value == val)
this.comList.push(this.options[index])
this.options.splice(index, 1);
findIndex 返回数组下标
var newList = [...this.list] //...深拷贝,JSON.parse(JSON.Stringify),split
newList = newList.filter(item=>item.id !== id) //删除过滤
filter不改变原数组,所以要重新赋值
let languages = ["JavaScript", "C", "Java","C++", "Python", "Lua"];
let check = languages.includes("Java"); //有java返回true,没有返回false
languages.indexOf("Java") //有就返回下标2,没有返回-1