Browse Source

Merge pull request #1615 from jcbt/support_tab_id

使自定义表单中的tab支持传递自定义id
Jiang Qinghua 3 years ago
parent
commit
d8aa60cc1c
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/Form/Concerns/HasTabs.php

+ 4 - 2
src/Form/Concerns/HasTabs.php

@@ -17,11 +17,13 @@ trait HasTabs
      *
      * @param  string  $title
      * @param  Closure  $content
+     * @param  bool  $active
+     * @param  string|null  $id
      * @return $this
      */
-    public function tab($title, Closure $content, $active = false)
+    public function tab($title, Closure $content, $active = false, ?string $id = null)
     {
-        $this->getTab()->append($title, $content, $active);
+        $this->getTab()->append($title, $content, $active, $id);
 
         return $this;
     }