!14 【轻量级 PR】:新增 action 可自定义icon

Merge pull request !14 from 青芒/N/A
This commit is contained in:
JaguarJack 2021-12-24 00:13:56 +00:00 committed by Gitee
commit 841fd47487

View File

@ -70,11 +70,12 @@ class Actions
* @param string|null $event
* @return Button
*/
public static function normal(string $text, $type = '', string $event = null): Button
public static function normal(string $text, $type = '', string $event = null, string $icon = ''): Button
{
$button = (new Button)
->size('mini')
->type($type)
->icon($icon)
->text(self::$noText ? '' : $text);
if ($event) {