inputFocus(){
                this.$nextTick(function () {
                    this.$refs.customerInput.$el.querySelector('input').focus();
                });
            },

  1.组件

<el-button @click="inputFocus">聚焦按钮</el-button>
<el-input ref="customerInput" v-model="form.num" @blur="blurSearchFor"></el-input>

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案