相关文章推荐
潇洒的饺子  ·  WPF ...·  1 年前    · 
活泼的硬盘  ·  matplotlib ...·  1 年前    · 

el-input 失去焦点事件

El-input 是 Element UI 库中的一个组件,它具有失去焦点事件。您可以通过在组件上添加 @blur 事件监听器来响应该事件,代码如下:

<template>
  <el-input @blur="handleBlur"/>
</template>
<script>
export default {
  methods: {
    handleBlur() {
      console.log('Input lost focus')
</script>

当用户离开 el-input 组件时,会触发失去焦点事件,并调用 handleBlur 方法。

  •