html结构

//遍历optionsList看每一项的值在quNameList数组中有没有,如果有,则不显示
<el-select v-model="addForm.repositoryType" size="small"  clearable   placeholder="请选择" >
     <el-option v-for="item in optionsList" :key="item.value" :label="item.label"  :value="item.value" 
        v-if="quNameList.indexOf(item.value) == -1" > </el-option>
</el-select>

methods 方法中

this.quNameList = []
//this.rowData.children 已经添加到角色中的员工列表,
//遍历这个列表,取出列表中的值(name,或id)添加到quNameList数组中

let children = this.rowData.children
children.map(item=>{
    this.quNameList.push(item.repositoryType)
})

冬瓜先生
29 声望3 粉丝