Selaa lähdekoodia

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

jqh 4 vuotta sitten
vanhempi
commit
7d9f69533b
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  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()