<el-table class='product_table' :data="productData" border> <el-table-column prop='name' label="起始卡号" align='center'> <template slot-scope="scope"> <el-form :rules='rules' ref='cardStartNo' :model="productForm"> <el-form-item class='form-item' prop='cardStartNo' label=' '> <el-input v-model='scope.row.cardStartNo'></el-input> </el-form-item> </el-form> </template> </el-table-column> </el-table>
rules: { cardStartNo: [ { required: true, message: '请输入起始卡号', trigger: 'blur' } ] }