소스 검색

fix: 当options为空时无限循环

FutureMeng 6 달 전
부모
커밋
9b134161a9
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,