浏览代码

:construction: wip

jqh 4 年之前
父节点
当前提交
e4a7a70343
共有 2 个文件被更改,包括 15 次插入15 次删除
  1. 1 1
      src/Form/Field/Number.php
  2. 14 14
      src/Layout/Content.php

+ 1 - 1
src/Form/Field/Number.php

@@ -9,7 +9,7 @@ class Number extends Text
     protected $options = [
         'upClass'   => 'primary shadow-0',
         'downClass' => 'light shadow-0',
-        'center'    => true
+        'center'    => true,
     ];
 
     /**

+ 14 - 14
src/Layout/Content.php

@@ -261,13 +261,17 @@ class Content implements Renderable
      */
     public function build()
     {
-        $html = '';
+        try {
+            $html = '';
 
-        foreach ($this->rows as $row) {
-            $html .= $row->render();
-        }
+            foreach ($this->rows as $row) {
+                $html .= $row->render();
+            }
 
-        return $html;
+            return $html;
+        } catch (\Throwable $e) {
+            return Admin::handleException($e);
+        }
     }
 
     /**
@@ -487,18 +491,14 @@ class Content implements Renderable
      */
     public function render()
     {
-        try {
-            $this->callComposing();
-            $this->shareDefaultErrors();
+        $this->callComposing();
+        $this->shareDefaultErrors();
 
-            $this->variables['content'] = $this->build();
+        $this->variables['content'] = $this->build();
 
-            $this->callComposed();
+        $this->callComposed();
 
-            return view($this->view, $this->variables())->render();
-        } catch (\Throwable $e) {
-            return Admin::handleException($e);
-        }
+        return view($this->view, $this->variables())->render();
     }
 
     /**