<el-form-item label="类别" prop="number">
<el-cascader
v-model="newData.number"
:options="typeChoose"
:props="{ expandTrigger: 'hover', checkStrictly: true,value: 'id', label: 'name'}"
>
</el-cascader>
</el-form-item>
校验规则:
rules: {
number: [{type: 'array', required: true, message: '请选择类别', trigger: 'change' }],
},
ElementUI 之 Cascader 级联选择器指定 value label