js v-if 判断
<div v-if="suborder.approve_user==user_id || suborder.approve_userrole_id in roles" >
重组装列表
roles:[ { "roles__name": "Boss", "roles__id": 1 }, { "roles__name": "Hr", "roles__id": 2 } ] var roles_data=roles console.log(resp.roles) var arr= [ ,] for(var i=0; i<roles_data.length;i++){ arr.push(roles_data[i]['roles__id']) this.roles=arr console.log(this.roles) }