The element-ui input box @ input event is invalid

<el-input v-model="a" @input.native="a=1"></el-input>

element-ui version 2.x input event is invalid and seems to be valid only once. But I use version 1.4, input event deficiency can take effect, request how to solve the 2.x version @ input failure

Mar.28,2021

v-model itself is a grammatical sugar, which is equivalent to

.
///:
<el-input :value="a" @input="a=$event" />

then you can consider adding other handlers to @ input as appropriate


has a sacrosanct mechanism on the front end called bubbling, so just replace @ input with @ input.native!

Menu