I have an input field and I need to call the function every time when value is changed and pass the new value to the function. I couldn't find how to do it.
<template slot-scope="scope">
<el-input
type="text"
:value="scope.row.name"
v-model="queryName"
@change="changeQueryName(scope.row.id, ???.queryName)">
</el-input>
</template>
You can pass the $event
@change="changeQueryName($event, scope.row.id, ???.queryName)"
This is de doc HTMLElement: Event
In the changeQueryName() function you can use event.target.value
changeQueryName(event, id, queryName) {
console.log(event.target.value)
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With