kazupon / vue-validator

:white_check_mark: Validator component for Vue.js
MIT License
2.19k stars 431 forks source link

input绑定v-model后触发了死循环 #337

Closed xiyangjun closed 7 years ago

xiyangjun commented 7 years ago

vue & vue-validator version

2.0.3, 3.0.0-alpha.1

按照你的示例https://github.com/vuejs/vue-validator/blob/dev/examples/started/index.html 我在input上绑定了v-model之后触发了死循环。

我在示例中添加的代码

data: {
       inputValue: '',
       result: {},
       events: []
 }
<input type="text" @input="handleValidate" v-model="inputValue" >

当你在input中输入第二个字符的时候就会引发死循环。

@input 替换为 @change后是可以正确运行的。

kazupon commented 7 years ago

sorry, this is alpha version yet. I'll try to fix the v-model integration.