瀏覽代碼

Merge pull request #588 from futuremeng/master

fix: 当options为空时无限循环
Archer 3 月之前
父節點
當前提交
9bd7ae1097
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/components/Form/src/Form.vue

+ 1 - 0
src/components/Form/src/Form.vue

@@ -154,6 +154,7 @@ export default defineComponent({
 
     const getOptions = async (fn: Function, item: FormSchema) => {
       const options = await fn()
+      if (!options || options.length == 0) return
       setSchema([
         {
           field: item.field,