Explorar o código

工具表单设置显示数据逻辑调整

jqh %!s(int64=4) %!d(string=hai) anos
pai
achega
7d9f69533b
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  1. 4 4
      src/Widgets/Form.php

+ 4 - 4
src/Widgets/Form.php

@@ -819,10 +819,6 @@ HTML;
 
     protected function prepareForm()
     {
-        if (method_exists($this, 'form')) {
-            $this->form();
-        }
-
         if (! $this->data && method_exists($this, 'default')) {
             $data = $this->default();
 
@@ -830,6 +826,10 @@ HTML;
                 $this->fill($data);
             }
         }
+
+        if (method_exists($this, 'form')) {
+            $this->form();
+        }
     }
 
     protected function prepareHandler()