|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
namespace Dcat\Admin\Grid;
|
|
|
|
|
|
+use Dcat\Admin\Grid\Column\Help;
|
|
|
+use Dcat\Admin\Grid\Column\Sorter;
|
|
|
use Dcat\Admin\Widgets\Widget;
|
|
|
use Dcat\Admin\Grid;
|
|
|
|
|
@@ -93,6 +95,20 @@ class Header extends Widget
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * Add a help tooltip to column header.
|
|
|
+ *
|
|
|
+ * @param string|\Closure $message
|
|
|
+ * @param null|string $style 'green', 'blue', 'red', 'purple'
|
|
|
+ * @param null|string $placement 'bottom', 'left', 'right', 'top'
|
|
|
+ *
|
|
|
+ * @return $this
|
|
|
+ */
|
|
|
+ public function help($message, ?string $style = null, ? string $placement = 'bottom')
|
|
|
+ {
|
|
|
+ return $this->append((new Help($message, $style, $placement))->render());
|
|
|
+ }
|
|
|
+
|
|
|
protected function setupAttributes()
|
|
|
{
|
|
|
$count = count($this->columnNames);
|