element select 弹框关闭blur方法

4,553 阅读1分钟

blur方法

当select change的时候 去调用blur方法

select模块

<el-select 
  ref="projectApplicant"
  class="form-inp-select" 
  v-model="projectApplicatValue" 
  filterable 
  multiple 
  placeholder=""
  @change="_select_more_event">
    <el-option
      v-for="item in projectApplicatArr"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
</el-select>

_select_more_event方法

_select_more_event(){
    let _this = this;
    setTimeout(function() {
      _this.$refs.projectApplicant.blur();
      _this.$refs.investmentTarget.blur();
    }, 50);
},