elementui form表单 数组中对象校验 深结构校验
页面代码
<el-form :inline="true" :model="goods" :rules="rules" ref="goods" label-width="90px">
<el-card>
<el-form-item label="商品名称:" prop="name">
<el-input v-model="goods.name" placeholder="商品名称"></el-input>
</el-form-item>
<el-form-item label="商品描述:" prop="productDesc">
<el-input v-model="goods.productDesc" placeholder="商品描述"></el-input>
</el-form-item>
<el-form-item label="推荐位:">
<el-select v-model="goods.suggestFlag" placeholder="请选择">
<el-option v-for="item in suggestFlagList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>