Vue input triggers change event

The value of
  1. input I bound with vmurModele = "name". Changing the name value directly will not trigger the native change event. How can it be realized? There seems to be no similar example on the Internet
Mar.28,2021

I don't quite understand the meaning of the subject, but if what the subject wants to ask is why the original change event cannot be detected, I know the reason

The instruction v-model in

. Vue is actually the following abbreviation

clipboard.png

vueinputinputinput vue

$emit ,dom dom

vue



watchname


clipboard.png
use v-model.lazy
I don't know if it's the effect you want. The difference between using lazy or not is that you are listening for changes in input value in real time when you are not using lazy, which is usually triggered when input presses enter or blur, just like the literal meaning "lazy Synchronize"


you can modify it, indicating that you know when to deal with it, so you can manually trigger the change event of < input > . Or just do what you want.


listen for changes in values with watch observers, a process called publish / subscribe

Menu