<el-form-item label="实际扣分:" style="color: red" >
<el-input v-model="item.deductPoints" placeholder="请输入分数" v-on:input="search" />
</el-form-item>
监听方法需要使用v-on:input="“方法名”
search(e){
var count = 0;
for (var i = 0; i < this.ScoreInfo.length; i++) {
// 这里将数组中的字符串转换为数字,乘以1就可以
count = count + this.ScoreInfo[i].deductPoints * 1
}
this.form.fraction = count;
},