res.employee.data.role.forEach(角色=> {this.roleadd = {标签:role.display_name,值:role.name} this.roles.push(this.roleadd);}); >
<p-multiSelect [style]="{'width':'100%','z-index': '1'}" [options]="roles" [(ngModel)]="model.role" [formControl]="form.controls['role']"></p-multiSelect>
答案 0 :(得分:0)
SelectItem
具有disabled
属性。您需要将disabled = true
设置为禁用下拉菜单
this.roleadd = { label: role.display_name, value: role.name, disabled: true }