button 新增路由跳转

This commit is contained in:
JaguarJack 2021-04-29 08:48:24 +08:00
parent 4580815fca
commit 6c22fed48d

View File

@ -33,4 +33,18 @@ class Button extends Component
return $this;
}
/**
* 支持路由跳转
*
* @time 2021年04月28日
* @param string $route
* @return $this
*/
public function to(string $route): Button
{
$this->attributes['route'] = $route;
return $this;
}
}