* zin: add gap property to flex widgets.

This commit is contained in:
sunhao
2024-03-24 15:33:09 +08:00
parent c74bcce506
commit 39cb2fa619
3 changed files with 9 additions and 0 deletions
+2
View File
@@ -5,6 +5,7 @@ namespace zin;
class col extends wg
{
protected static array $defineProps = array(
'gap?: string|number',
'justify?:string',
'align?:string'
);
@@ -19,6 +20,7 @@ class col extends wg
return div
(
setClass($classList),
zui::gap($this->prop('gap')),
set($this->getRestProps()),
$this->children()
);
+2
View File
@@ -5,6 +5,7 @@ namespace zin;
class row extends wg
{
protected static array $defineProps = array(
'gap?: string|number',
'justify?: string',
'align?: string'
);
@@ -19,6 +20,7 @@ class row extends wg
return div
(
setClass($classList),
zui::gap($this->prop('gap')),
set($this->getRestProps()),
$this->children()
);
+5
View File
@@ -203,6 +203,11 @@ class zui extends wg
return $value ? setClass('disabled') : null;
}
public static function gap($value)
{
return zui::skin('gap', $value, '0', 'gap');
}
public static function width($value)
{
return zui::skin('w', $value, '0', 'width');