下面是一个表单的一个项,是一个下拉选择列表,数据从
optionApi: async () => {
const res = await getStartData()
return res.Data?.ExamPlaceList
}
拿到,但是我想在中间随时可以修改这个下拉列表的数据,怎么来修改了?
const schema2 = reactive<FormSchema[]>([
{
field: 'ExamPlace',
label: '标本送检部位',
component: 'SelectV2',
componentProps: {
filterable: true,
allowCreate: true,
options: [],
props: {
label: 'InfoName',
value: 'InfoName'
}
},
colProps: {
span: 6
},
optionApi: async () => {
const res = await getStartData()
return res.Data?.ExamPlaceList
}
}]