瀏覽代碼

Tree: fix lazyload bug

Dreamacro 8 年之前
父節點
當前提交
79d1ff06f6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/tree/src/model/node.js

+ 1 - 1
packages/tree/src/model/node.js

@@ -370,7 +370,7 @@ export default class Node {
   }
 
   loadData(callback, defaultProps = {}) {
-    if (this.store.lazy === true && this.store.load && !this.loaded && !this.loading) {
+    if (this.store.lazy === true && this.store.load && !this.loaded && (!this.loading || Object.keys(defaultProps).length)) {
       this.loading = true;
 
       const resolve = (children) => {