jqh 5 年之前
父节点
当前提交
a6c708a747
共有 1 个文件被更改,包括 7 次插入5 次删除
  1. 7 5
      src/Grid/Tools/AbstractTool.php

+ 7 - 5
src/Grid/Tools/AbstractTool.php

@@ -14,15 +14,17 @@ abstract class AbstractTool extends Grid\GridAction
     /**
      * @var string
      */
-    protected $style = 'btn btn-outline-primary';
+    protected $style = 'btn btn-white waves-effect';
 
     /**
-     * @return void
+     * @return string
      */
-    public function setupHtmlAttributes()
+    protected function html()
     {
-        $this->addHtmlClass($this->style);
+        $this->appendHtmlAttribute('class', $this->style);
 
-        parent::setupHtmlAttributes();
+        return <<<HTML
+<button {$this->formatHtmlAttributes()}>{$this->title()}</button>
+HTML;
     }
 }