diff --git a/src/components/Form/src/Form.vue b/src/components/Form/src/Form.vue index 468cf6e..eb18f75 100644 --- a/src/components/Form/src/Form.vue +++ b/src/components/Form/src/Form.vue @@ -249,8 +249,11 @@ export default defineComponent({ // 渲染formItem const renderFormItem = (item: FormSchema) => { - // 如果有optionApi,优先使用optionApi - if (item.optionApi) { + // 如果有optionApi,优先使用optionApi, 并且options不存在或者为空数组 + if ( + item.optionApi && + (!item.componentProps?.options || !item.componentProps?.options.length) + ) { // 内部自动调用接口,不影响其它渲染 getOptions(item.optionApi, item) }