<div v-for="(item,i) in ruleContent" :key="i">
<!-- eg:想通过循环将【i】传进函数ruleContentNum()里 -->
<!-- 方法:【$event】是默认回调参数,相当于(currentValue, oldValue),【i】就是自定义参数 -->
<el-input-number v-model="ruleContent[i]" :min="0" @change="ruleContentNum($event,i)" :step="5" step-strictly v-if="item!=0"></el-input-number>
</div>
<!-- js对应的函数 -->
ruleContentNum(event, i) {
if (event * 1 == 0) {
this.ruleContent.splice(i, 1);
}
},