vue 根据id找出数组里的对象
dsChange(id){let selectedName = {};selectedName = this.dsOptions.find((item)=>{return item.dsid === id;//筛选出匹配数据,是对应数据的整个对象});this.formModel.ds = selectedName.dsthis.formModel.dsid = selectedName.d
·
dsChange(id){
let selectedName = {};
selectedName = this.dsOptions.find((item)=>{
return item.dsid === id;
//筛选出匹配数据,是对应数据的整个对象
});
this.formModel.ds = selectedName.ds
this.formModel.dsid = selectedName.dsid
},
更多推荐
已为社区贡献7条内容
所有评论(0)