Vue 引导模糊事件

Pet*_*ran 5 vue.js

我无法在模糊事件上使用 vue,在我的组件中我有一个@change指令

<b-input :value="value" @change="validateEmail($event)" @input="$emit('input', $event)" ref="input" :state="state"/>
Run Code Online (Sandbox Code Playgroud)

这是因为@blur似乎不起作用。 Bootstrap vue on:blur 处理程序未被调用

当我更改输入并点击选项卡时,这部分起作用,然后起作用,但是如果我专注于输入并单击选项卡而不更改输入,则它不起作用。我想显示一条消息,表明在这种情况下需要电子邮件,但我不能。

bra*_*aed 5

@blur.native您可以与 Bootstrap Vue 输入一起 使用。

<b-input
        :value="value"
        @change="validateEmail($event)"
        @input="$emit('input', $event)"
        ref="input"
        :state="state"

        @blur.native="handleBlur"

/>
Run Code Online (Sandbox Code Playgroud)

https://github.com/bootstrap-vue/bootstrap-vue/issues/1645#issuecomment-369477878