<el-form :model="inServForm" ref="inServForm" :rules="rules" size="small">
<el-table ref="infiledList" border :data="inServForm.infiledList" style="width: 100%" >
<el-table-column prop="matnrid" label="阈值" width="165px">
<template scope="scope">
<el-form-item :prop="'infiledList.'+scope.$index+'.threshold'" :rules="rules.matnrid">
<el-input size="mini" v-model="scope.row.threshold" ></el-input>
</el-form-item>
</template>
</el-table-column>
</el-table>
</el-form>
export default {
data() {
return {
inServForm: {
infiledList:[],
},
},
computed: {
rules(){
return {
threshold: [{
required: true,
message: "阈值不能为空",
trigger: "blur"
}]
}
}
}
}
}
vue+element table表格校验必填项
最新推荐文章于 2024-05-11 10:04:16 发布