* [refac] refactor.

This commit is contained in:
sunhao
2024-07-15 10:04:18 +08:00
committed by 谢杞钰
parent dd8c0cdac7
commit f26755d2b6
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -13,14 +13,14 @@ class col extends wg
protected function build()
{
$classList = 'col';
list($justify, $align) = $this->prop(array('justify', 'align'));
list($justify, $align, $gap) = $this->prop(array('justify', 'align', 'gap'));
if(!empty($justify)) $classList .= ' justify-' . $justify;
if(!empty($align)) $classList .= ' items-' . $align;
return div
(
setClass($classList),
zui::gap($this->prop('gap')),
is_numeric($gap) ? setClass("gap-$gap") : setStyle('gap', $gap),
set($this->getRestProps()),
$this->children()
);
+2 -2
View File
@@ -13,14 +13,14 @@ class row extends wg
protected function build()
{
$classList = 'row';
list($justify, $align) = $this->prop(array('justify', 'align'));
list($justify, $align, $gap) = $this->prop(array('justify', 'align', 'gap'));
if(!empty($justify)) $classList .= ' justify-' . $justify;
if(!empty($align)) $classList .= ' items-' . $align;
return div
(
setClass($classList),
zui::gap($this->prop('gap')),
is_numeric($gap) ? setClass("gap-$gap") : setStyle('gap', $gap),
set($this->getRestProps()),
$this->children()
);