From af569406cb2a7938491e5c6bf75c09bce961fc77 Mon Sep 17 00:00:00 2001 From: JaguarJack Date: Wed, 12 May 2021 08:10:56 +0800 Subject: [PATCH] =?UTF-8?q?table=E6=96=B0=E5=A2=9E=20tips=20=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extend/catcher/library/table/Table.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/extend/catcher/library/table/Table.php b/extend/catcher/library/table/Table.php index cb05184..3c80d2d 100644 --- a/extend/catcher/library/table/Table.php +++ b/extend/catcher/library/table/Table.php @@ -146,6 +146,12 @@ class Table */ protected $bind = false; + /** + * @var string + */ + protected $tips = null; + + /** * Table constructor. * @param string $ref @@ -372,6 +378,24 @@ class Table return $this; } + /** + * 表格提示 + * + * @time 2021年05月12日 + * @param string $content + * @param string $type + * @return $this + */ + public function withTips(string $content, string $type = 'success'): Table + { + $this->tips = [ + 'content' => $content, + 'type' => $type + ]; + + return $this; + } + /** * 导出路由 *