El componente de selección múltiple el-select en el elemento ui se cierra automáticamente después de la selección

  //html
  <el-select  
    @change="selectChange" 
    ref="selectAppType"
    style="width:620px"
    filterable
    remote
    clearable
    :remote-method="xxx"
    v-model="xxx"
    multiple 
    <el-option
      v-for="item in xxx"
      :key="item.value"
      :label="item.label"
      :value="item.value">
    </el-option>
  </el-select>


 //js
 selectChange(){
   let _this = this;
   setTimeout(function() {
     _this.$refs.selectAppType.blur();
   }, 50);
 }	

La esencia es ayudarlo a perder el enfoque automáticamente.

 

Supongo que te gusta

Origin blog.csdn.net/a1059526327/article/details/108821405
Recomendado
Clasificación