Browse Source

Grid action

update
jqh 5 years ago
parent
commit
bd724ee8a9

+ 1 - 2
resources/assets/dcat/sass/dcat-app.scss

@@ -108,7 +108,7 @@ table.data-list-view.dataTable tbody tr:hover, table.data-thumb-view.dataTable t
 }
 
 
-// 表格
+// grid表格
 .grid-column-header {
   a {
     color: $dark70;
@@ -117,7 +117,6 @@ table.data-list-view.dataTable tbody tr:hover, table.data-thumb-view.dataTable t
     color: $primary-darker;
   }
 }
-
 // 排序图标
 .grid-sort {
   display: inline-block;

+ 1 - 3
src/Grid/Concerns/HasActions.php

@@ -29,9 +29,7 @@ trait HasActions
      */
     public function setActionClass(string $actionClass)
     {
-        if (is_subclass_of($actionClass, Grid\Displayers\Actions::class)) {
-            $this->actionsClass = $actionClass;
-        }
+        $this->actionsClass = $actionClass;
 
         return $this;
     }

+ 4 - 4
src/Grid/Displayers/Actions.php

@@ -229,7 +229,7 @@ class Actions extends AbstractDisplayer
     {
         return <<<EOT
 <a href="{$this->resource()}/{$this->getKey()}">
-    <i class="ti-eye grid-action-icon"></i>
+    <i class="feather icon-eye grid-action-icon"></i>
 </a>&nbsp;
 EOT;
     }
@@ -243,7 +243,7 @@ EOT;
     {
         return <<<EOT
 <a href="{$this->resource()}/{$this->getKey()}/edit">
-    <i class="ti-pencil-alt grid-action-icon"></i>
+    <i class="feather icon-edit grid-action-icon"></i>
 </a>&nbsp;
 EOT;
     }
@@ -266,7 +266,7 @@ EOT;
 
         return <<<EOF
 <a class="{$this->grid->getRowName()}-edit" data-url="{$this->resource()}/{$this->getKey()}/edit" href="javascript:void(0);">
-    <i class=" fa fa-clone grid-action-icon"></i>
+    <i class="fa fa-clone grid-action-icon"></i>
 </a>&nbsp;
 EOF;
     }
@@ -280,7 +280,7 @@ EOF;
     {
         return <<<EOT
 <a href="javascript:void(0);" data-url="{$this->resource()}/{$this->getKey()}" data-action="delete">
-    <i class="ti-trash grid-action-icon"></i>
+    <i class="feather icon-trash-2 grid-action-icon"></i>
 </a>&nbsp;
 EOT;
     }