From 6c22fed48d672bd8543207f5ef4423f6ab1f17b7 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Thu, 29 Apr 2021 08:48:24 +0800 Subject: [PATCH] =?UTF-8?q?button=20=E6=96=B0=E5=A2=9E=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/library/table/components/Button.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/extend/catcher/library/table/components/Button.php b/extend/catcher/library/table/components/Button.php index 0793845..bae0580 100644 --- a/extend/catcher/library/table/components/Button.php +++ b/extend/catcher/library/table/components/Button.php @@ -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; + } } \ No newline at end of file