From f26755d2b623c0fb9b97a8ea9d5e2daa7f12ea2c Mon Sep 17 00:00:00 2001 From: sunhao Date: Tue, 9 Jul 2024 16:29:45 +0800 Subject: [PATCH] * [refac] refactor. --- lib/zin/wg/col/v1.php | 4 ++-- lib/zin/wg/row/v1.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/zin/wg/col/v1.php b/lib/zin/wg/col/v1.php index 1eef981183..38b879669b 100644 --- a/lib/zin/wg/col/v1.php +++ b/lib/zin/wg/col/v1.php @@ -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() ); diff --git a/lib/zin/wg/row/v1.php b/lib/zin/wg/row/v1.php index 9b908d5881..e07b9a5f17 100644 --- a/lib/zin/wg/row/v1.php +++ b/lib/zin/wg/row/v1.php @@ -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() );