Bootstrap vue on:blur handler is not been called

白昼怎懂夜的黑 提交于 2019-12-11 07:42:19

问题


I have the following component

<template>
  <b-input :value="value" @blur="validateEmail" ref="input" :state="state"/>
</template>

<script>
  export default {

    methods: {
      validateEmail: function() {
      console.log('test')
    },

  }
</script>

The method validateEmail is not been triggered when input loses focus.


回答1:


Change @blur to @change and it will work.



来源:https://stackoverflow.com/questions/53207177/bootstrap-vue-onblur-handler-is-not-been-called

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!