TebChange() {
console.log(this.typeEbargoList);
var _index = this.typeEbargoList.findIndex( event=>{
console.log(event);
return event.id === this.form.type;
});
// console.log(_index);
this.hidden=this.typeEbargoList[_index].hidden
},
注:typeEbargoList是一个数组
- 0: {id: 1, title: "封角色", hidden: false}
- 1: {id: 6, title: "解除封聊天", hidden: true}
- 2: {id: 7, title: "解除封账号", hidden: true}
event拿到 typeEbargoList里面的每一个数据
this.form.type是我们要选择的一个数据(它是id)
return 出自己想要的数据