Selaa lähdekoodia

修复Filter ignore无效问题;增加暗黑模式颜色

jqh 4 vuotta sitten
vanhempi
commit
f29205f015
3 muutettua tiedostoa jossa 17 lisäystä ja 5 poistoa
  1. 1 1
      src/Admin.php
  2. 12 0
      src/Color.php
  3. 4 4
      src/Grid/Filter/AbstractFilter.php

+ 1 - 1
src/Admin.php

@@ -28,7 +28,7 @@ class Admin
     use HasAssets;
     use HasHtml;
 
-    const VERSION = '2.0.0-beta';
+    const VERSION = '2.0.2-beta';
 
     const SECTION = [
         // 往 <head> 标签内输入内容

+ 12 - 0
src/Color.php

@@ -56,6 +56,10 @@ use Illuminate\Support\Traits\Macroable;
  * @method string border(int $amt = 0)
  * @method string inputBorder(int $amt = 0)
  * @method string background(int $amt = 0)
+ * @method string darkModeBg(int $amt = 0)
+ * @method string darkModeFont(int $amt = 0)
+ * @method string darkModeColor(int $amt = 0)
+ * @method string darkModeColor2(int $amt = 0)
  */
 class Color
 {
@@ -173,6 +177,14 @@ class Color
 
         // 背景色
         'background' => '#eff3f8',
+
+        // 深色模式
+        // 背景色
+        'dark-mode-bg' => '#2c2c43',
+        // 深色
+        'dark-mode-color' => '#222233',
+        'dark-mode-color2' => '#1e1e2d',
+        'dark-mode-font' => '##a8a9bb',
     ];
 
     /**

+ 4 - 4
src/Grid/Filter/AbstractFilter.php

@@ -271,10 +271,6 @@ abstract class AbstractFilter
      */
     public function condition($inputs)
     {
-        if ($this->ignore) {
-            return;
-        }
-
         $value = Arr::get($inputs, $this->column);
 
         if ($value === null) {
@@ -554,6 +550,10 @@ abstract class AbstractFilter
      */
     protected function buildCondition(...$params)
     {
+        if ($this->ignore) {
+            return;
+        }
+
         $column = explode('.', $this->column);
 
         if (count($column) == 1) {