<el-table-column prop="volume" label="成交数量" width="120">
<template scope="scope">
<el-input v-model="scope.row.volume" placeholder='请输入' type="number" v-on:change="verificationRule"></el-input>
</template>
</el-table-column>
methods: {
verificationRule(value){
console.log(value);
},
}
When the value of the input value changes, how can the change event cause the corresponding scope.row.volume to change? Can anyone please give me some advice?
You can achieve two-way binding with v-model. Why do you need to use the change event?
v-model
After binding, changes in the input area will directly change the value ofscope.row.volume
. Similarly, changes in the value ofscope.row.volume
will also be reflected in the display of the input area, so it is No need to manually write change events