for循环中渲染的input,不可连续输入
Vue version
3.2.41
Link to minimal reproduction
Steps to reproduce
- 打开复现代码
- 点击任意输入框进行输入
What is expected?
我希望可以在任意输入框可以进行连续输入。
What is actually happening?
输入框在输入字符后,失去焦点,需要再次点击才可以输入
System Info
No response
Any additional comments?
No response
先别加key, 或者key使用其他值,v-model导致数组值变化,使得v-for中绑定的key发生变化,重新渲染了input,从而失去焦点 Don't add a key, or use other values for the key, v-model causes the array value to change, which makes the key bound in v-for change, re-renders the input, and loses focus