瀏覽代碼

fix label color

jqh 5 年之前
父節點
當前提交
aaeeb2c152
共有 3 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      src/Grid/Column/HasDisplayers.php
  2. 1 1
      src/Grid/Displayers/Label.php
  3. 2 2
      src/Show/Field.php

+ 1 - 1
src/Grid/Column/HasDisplayers.php

@@ -212,7 +212,7 @@ trait HasDisplayers
 
             $style = $style === 'default' ? 'dark70' : $style;
 
-            $background = Admin::color()->get($style);
+            $background = Admin::color()->get($style, $style);
 
             return "<i class='fa fa-circle' style='font-size: 13px;color: {$background}'></i>&nbsp;&nbsp;";
         });

+ 1 - 1
src/Grid/Displayers/Label.php

@@ -34,7 +34,7 @@ class Label extends AbstractDisplayer
         $background = '#d2d6de';
 
         if ($style !== 'default') {
-            $style = Admin::color()->get($style);
+            $style = Admin::color()->get($style, $style);
 
             $background = "style='background:{$style}'";
         }

+ 2 - 2
src/Show/Field.php

@@ -350,7 +350,7 @@ HTML;
 
             $style = $style === 'default' ? 'dark70' : $style;
 
-            $background = Admin::color()->get($style);
+            $background = Admin::color()->get($style, $style);
 
             return "<i class='fa fa-circle' style='font-size: 13px;color: {$background}'></i>&nbsp;&nbsp;";
         });
@@ -389,7 +389,7 @@ HTML;
         if ($style !== 'default') {
             $class = '';
 
-            $style = Admin::color()->get($style);
+            $style = Admin::color()->get($style, $style);
             $background = "style='background:{$style}'";
         }