效果图:
目的:
实现表格中每一项都是必填项,如果没填,在提交时会发出警告。
代码:
<el-form ref="detailForm" :model="detail" label-width="0">
<el-table v-loading="loading"
:data="detail.appear"
border
highlight-current-row
:header-cell-style="{ color: '#333',background: '#F6F7FC'}">
<el-table-column type="index" label="序号" width="100" align="center" />
<el-table-column label="加分类型" prop="type" align="center">
<template slot-scope="scope">
<el-form-item :prop="'appear