* zin: add open-url class to backBtn element.

This commit is contained in:
sunhao
2023-06-10 13:46:20 +08:00
parent 008e96b4de
commit faadd0c73e
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -45,4 +45,17 @@ class backBtn extends btn
$props['data-back'] = $this->prop('back');
return $props;
}
/**
* Override the getClassList method.
*
* @access protected
* @return array
*/
protected function getClassList(): array
{
$classList = parent::getClassList();
$classList['open-url'] = true;
return $classList;
}
}
+1 -1
View File
@@ -66,7 +66,7 @@ class btn extends wg
return $children;
}
private function getClassList()
protected function getClassList()
{
list($url, $type, $caret, $text, $icon, $trailingIcon) = $this->prop(array('url', 'type', 'caret', 'text', 'icon', 'trailingIcon'));
$onlyCaret = empty($text) && !empty($caret) && empty($icon) && empty($trailingIcon);