新增 action 可自定义icon
新增 action 可自定义icon
This commit is contained in:
parent
513eba9195
commit
f14a00d630
@ -70,11 +70,12 @@ class Actions
|
|||||||
* @param string|null $event
|
* @param string|null $event
|
||||||
* @return Button
|
* @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)
|
$button = (new Button)
|
||||||
->size('mini')
|
->size('mini')
|
||||||
->type($type)
|
->type($type)
|
||||||
|
->icon($icon)
|
||||||
->text(self::$noText ? '' : $text);
|
->text(self::$noText ? '' : $text);
|
||||||
|
|
||||||
if ($event) {
|
if ($event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user