Browse Source

修复 treeData 调用错误

xaboy 5 years ago
parent
commit
1c5caa8da6
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/UI/Elm/Components/Tree.php
  2. 1 1
      src/UI/Iview/Components/TreeData.php

+ 1 - 1
src/UI/Elm/Components/Tree.php

@@ -85,7 +85,7 @@ class Tree extends FormComponent
         $this->props['data'] = [];
         foreach ($treeData as $child) {
             $this->props['data'][] = $child instanceof TreeData
-                ? $child->build()
+                ? $child->getOption()
                 : $child;
         }
         return $this;

+ 1 - 1
src/UI/Iview/Components/TreeData.php

@@ -96,7 +96,7 @@ class TreeData implements OptionComponentInterface
         $children = [];
         foreach ($this->children as $child) {
             $children[] = $child instanceof TreeData
-                ? $child->build()
+                ? $child->getOption()
                 : $child;
         }
         $this->props['children'] = $children;