Skip to content

Commit

Permalink
修复content组件
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallRuralDog committed Mar 30, 2020
1 parent db39b71 commit 791bcd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
6 changes: 2 additions & 4 deletions src/Layout/Content.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,15 @@ public function body($content)
}


public function row($content, $gutter = 0)
public function row($content)
{

if ($content instanceof Closure) {
$row = new Row();
$row->gutter($gutter);
call_user_func($content, $row);
$this->addRow($row);
} else {
$row = new Row();
$row->gutter($gutter);
$row = new Row($content);
$this->addRow($row);
}
return $this;
Expand Down
18 changes: 0 additions & 18 deletions src/Layout/Row.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ class Row extends Component
protected $gutter = 0;





public function __construct($content = '')
{
if (!empty($content)) {
Expand All @@ -37,16 +34,6 @@ public function column($width, $content)
}


public function class($class)
{
if (is_string($class)) {
$class = [$class];
}
$this->class = $class;
return $this;
}


/**
* @param Column $column
*/
Expand All @@ -65,9 +52,4 @@ public function gutter($gutter)
$this->gutter = $gutter;
return $this;
}





}

0 comments on commit 791bcd7

Please sign in to comment.