1. 关闭el-cascader
// 多个
<el-cascader :options="deptOptions" v-model="item.deptId":ref="'elCascader' + index"
@change="$refs['elCascader' + index][0].dropDownVisible = false" />
// 单个
<el-cascader :options="deptOptions" v-model="deptId"ref="elCascader"
@change="$refs.elCascader.dropDownVisible = false" />
2.关闭多选的select
// 多个
<el-select v-model="item.value" multiple
:ref="'taskSelect' + scope.$index" @change="change($event, index)">
<el-option label="1" :value="1"></el-option>
<el-option label="1" :value="1"></el-option>
</el-select>
// js
change(){
this.$nextTick(() => {
this.$refs['taskSelect' + index].blur()
})
}
// 单个
<el-select v-model="value" multiple ref="taskSelect" @change="change($event, index)">
<el-option label="1" :value="1"></el-option>
<el-option label="1" :value="1"></el-option>
</el-select>
// js
change(){
this.$nextTick(() => {
this.$refs.taskSelect.blur()
})
}