소스 검색

formutil 方法调整

zhuth 8 년 전
부모
커밋
8b1c34a8f9
2개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 2
      frontend/saas-web/app/util/FormUtil.js
  2. 1 1
      frontend/saas-web/app/view/core/form/FormPanel.js

+ 1 - 2
frontend/saas-web/app/util/FormUtil.js

@@ -52,13 +52,12 @@ Ext.define('saas.util.FormUtil', {
                         }
                         }
                     });
                     });
                 }
                 }
-                form.addItems(items);
+                return form.addItems(items);
             }else {
             }else {
                 return []
                 return []
             }
             }
         })
         })
         .then(function(items) {
         .then(function(items) {
-            form.addItems(items);
             form.fireEvent('afterSetItems', form, items);
             form.fireEvent('afterSetItems', form, items);
         })
         })
         .catch(function(response) {
         .catch(function(response) {

+ 1 - 1
frontend/saas-web/app/view/core/form/FormPanel.js

@@ -94,7 +94,7 @@ Ext.define('saas.view.core.form.FormPanel', {
     },
     },
 
 
     addItems: function(items) {
     addItems: function(items) {
-        this.add(items);
+        return this.add(items);
     }
     }
     
     
 });
 });