<FormItem label="学科:" prop="teachingCourse">
<Select
v-model="formData.teachingCourse"
clearable
multiple
placeholder="选择教授的学科"
>
<Option
v-for="item in SUBJECTLIST"
:value="item.value"
:key="item.value"
>{{ item.value }}</Option
>
</Select>
</FormItem>
formDataValidate: {
teachingCourse: [
{
type:'array',
required: true,
message: "学科不能为空",
trigger: "change"
},
]
}
校验中加‘type:‘array’,否则不能通过校验