ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
``` <el-form :model="ruleForm" :rules="tableDataRules" ref="tableDataRef"> <el-table ref="multipleTable"         :data="ruleForm.tableData" tooltip-effect="dark" style="width: 100%"         @selection-change="handleSelectionChange" /> <el-form-item label=""   :rules="tableDataRules.lanId" //要想表格触发验证,这里时关键   :prop="'tableData.' + scope.$index + '.lanId'" /> <el-input v-model="scope.row.lanId" class="removeBorder" /> <el-form-item  :prop="'tableData.' + scope.$index + '.status'" :rules="[ { required:true, message:'请选择显示类型', trigger:'blur' }]" /> <el-select v-model="scope.row.status" placeholder="请选择 " clearable class="removeBorder" //去掉边框 /> </el-table> </el-form> ``` 数据格式:表格数据为数组,表单为对象 ***** ![](https://img.kancloud.cn/c4/4f/c44f6a99cf890579ea9ad3945218c865_312x291.png) ***** 验证规则 ``` tableDataRules: { lanId: { required:true, message:"请输入名称", trigger:"blur" }, seqNo: { required:true, message:"请输入值", trigger:"blur" },       }, ```