From e139963b9cc4024e49cf0a0023ed9b36c4b3a20d Mon Sep 17 00:00:00 2001 From: sunhao Date: Thu, 11 May 2023 09:01:56 +0800 Subject: [PATCH] * zin: auto add square class to button when only icon in it. --- lib/zin/wg/btn/v1.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/zin/wg/btn/v1.php b/lib/zin/wg/btn/v1.php index 51d1e214a8..bf31c5d12e 100644 --- a/lib/zin/wg/btn/v1.php +++ b/lib/zin/wg/btn/v1.php @@ -94,6 +94,8 @@ class btn extends wg if(!empty($type)) $classList[$type] = true; elseif(!empty($url)) $classList['btn-default'] = true; + if(empty($text) && !empty($icon) && !isset($classList['square'])) $classList['square'] = true; + $size = $this->prop('size'); if(!empty($size)) $classList["size-$size"] = true;