Skip to content

Commit

Permalink
fix: #458
Browse files Browse the repository at this point in the history
  • Loading branch information
kailong321200875 committed Jun 20, 2024
1 parent c77586c commit 49451ae
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/Form/src/Form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 49451ae

Please sign in to comment.