//1.定义focus事,绑定属性 
<el-input 
    v-model="headerInput" 
    @focus="onInputFocus"   @blur="onInputBlur":style="thisStyle"> </el-input>

thisStyle:'',//2.获得焦点事件
onInputFocus(){  let self = this;
 self.thisStyle="outline: 0;box-shadow: 0px 0px 10px 0px #ffffff;transition: border ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-moz-transition:border ease-in-out 0.15s,box-shadow ease-in-out 0.15s;-webkit-transition:border ease-in-out 0.15s,box-shadow ease-in-out 0.15s;"
},//3.失去焦点事件
onInputBlur(){  let self = this;  self.thisStyle = "width: 330px;"
},

 

相关文章:

  • 2021-12-19
  • 2022-01-20
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案