* zin: fix width not work in cell widget.

This commit is contained in:
sunhao
2023-07-19 11:24:18 +08:00
parent 0f28c57490
commit e6d4455957
+1
View File
@@ -21,6 +21,7 @@ class cell extends wg
$flex = $this->prop('flex');
if(!empty($width))
{
$basis = $width;
if(is_numeric($width)) $basis = $width . 'px';
elseif(preg_match('/^(\d+)\/(\d+)$/', $width, $matches) !== 0) $basis = ((int)$matches[1] / (int)$matches[2] * 100) . '%';
}