Browse Source

表单页面禁用perfectScrollbar插件

jqh 5 years ago
parent
commit
a96c9bb8b1
3 changed files with 5 additions and 3 deletions
  1. 2 0
      src/Controllers/AdminController.php
  2. 1 1
      src/Grid/Responsive.php
  3. 2 2
      src/Layout/Content.php

+ 2 - 0
src/Controllers/AdminController.php

@@ -95,6 +95,7 @@ class AdminController extends Controller
         return $content
             ->title($this->title())
             ->description($this->description()['edit'] ?? trans('admin.edit'))
+            ->perfectScrollbar(false)
             ->body($this->form()->edit($id));
     }
 
@@ -110,6 +111,7 @@ class AdminController extends Controller
         return $content
             ->title($this->title())
             ->description($this->description()['create'] ?? trans('admin.create'))
+            ->perfectScrollbar(false)
             ->body($this->form());
     }
 

+ 1 - 1
src/Grid/Responsive.php

@@ -69,7 +69,7 @@ class Responsive
     protected function disablePerfectScrollbar()
     {
         Content::composed(function (Content $content) {
-            $content->disablePerfectScrollbar();
+            $content->perfectScrollbar(false);
         });
     }
 

+ 2 - 2
src/Layout/Content.php

@@ -161,9 +161,9 @@ class Content implements Renderable
      *
      * @return $this
      */
-    public function disablePerfectScrollbar(bool $value = true)
+    public function perfectScrollbar(bool $value = true)
     {
-        $this->usingPerfectScrollbar = ! $value;
+        $this->usingPerfectScrollbar = $value;
 
         return $this;
     }