jqh 4 年之前
父節點
當前提交
5a06b960ba

+ 1 - 1
resources/assets/dcat/sass/components/_table.scss

@@ -202,7 +202,7 @@ $table-border-color: #eff3f8;
   }
 
   .table.custom-data-table {
-    padding: 5px 10px 10px;
+    padding: 5px 8px 8px;
   }
 
   .table-fixed-left .table.custom-data-table {

文件差異過大導致無法顯示
+ 0 - 0
resources/dist/dcat/css/dcat-app-blue-dark.css


文件差異過大導致無法顯示
+ 0 - 0
resources/dist/dcat/css/dcat-app-blue-light.css


文件差異過大導致無法顯示
+ 0 - 0
resources/dist/dcat/css/dcat-app-blue.css


文件差異過大導致無法顯示
+ 0 - 0
resources/dist/dcat/css/dcat-app-green.css


文件差異過大導致無法顯示
+ 0 - 0
resources/dist/dcat/css/dcat-app.css


+ 1 - 1
resources/views/filter/button.blade.php

@@ -16,7 +16,7 @@
             <li role="separator" class="dropdown-divider"></li>
             <li class="dropdown-item"><a href="{{ $url_no_scopes }}">{{ trans('admin.cancel') }}</a></li>
         </ul>
-        <button type="button" class="btn btn-primary" data-toggle="dropdown" style="padding: 0.75rem 1rem !important;border-left: 0">
+        <button type="button" class="btn btn-primary" data-toggle="dropdown" style="border-left: 0">
             @if($current_label) <span>{{ $current_label }}&nbsp;</span>@endif <i class="feather icon-chevron-down"></i>
         </button>
     @endif

+ 23 - 68
src/Layout/Content.php

@@ -55,11 +55,6 @@ class Content implements Renderable
      */
     protected $config = [];
 
-    /**
-     * @var bool
-     */
-    protected $usingPerfectScrollbar = false;
-
     /**
      * Content constructor.
      *
@@ -157,16 +152,10 @@ class Content implements Renderable
     }
 
     /**
-     * @param bool $value
-     *
-     * @return $this
-     *
      * @deprecated
      */
-    public function perfectScrollbar(bool $value = true)
+    public function perfectScrollbar()
     {
-        $this->usingPerfectScrollbar = $value;
-
         return $this;
     }
 
@@ -406,37 +395,6 @@ class Content implements Renderable
         }
     }
 
-    /**
-     * 页面滚动条优化.
-     */
-    protected function addPerfectScrollbarScript()
-    {
-        if (! $this->usingPerfectScrollbar) {
-            return;
-        }
-
-        Admin::script(
-            <<<'JS'
-(function () {
-    if ($(window).width() > 768) {
-        var ps, wps;
-        if ($('.full-page .wrapper').length) {
-            wps = new PerfectScrollbar('.full-page .wrapper');
-        }
-        ps = new PerfectScrollbar('html');
-        $(document).one('pjax:send',function () {
-            ps && ps.destroy();
-            ps = null; 
-              
-            wps && wps.destroy();
-            wps = null; 
-        });
-    }
-})()
-JS
-        );
-    }
-
     /**
      * @return array
      */
@@ -446,8 +404,7 @@ JS
             'header'          => $this->title,
             'description'     => $this->description,
             'breadcrumb'      => $this->breadcrumb,
-            'configData'      => $this->applClasses(),
-            'content'         => $this->build(),
+            'configData'      => $this->applyClasses(),
             'pjaxContainerId' => Admin::$pjaxContainerId,
         ], $this->variables);
     }
@@ -455,17 +412,17 @@ JS
     /**
      * @return array
      */
-    protected function applClasses()
+    protected function applyClasses()
     {
         // default data array
         $defaultData = [
-            'theme' => '',
+            'theme'             => '',
             'sidebar_collapsed' => false,
-            'sidebar_dark' => false,
-            'navbar_color' => '',
-            'navbar_class' => 'sticky',
-            'footer_type' => '',
-            'body_class' => '',
+            'sidebar_dark'      => false,
+            'navbar_color'      => '',
+            'navbar_class'      => 'sticky',
+            'footer_type'       => '',
+            'body_class'        => '',
         ];
 
         $data = array_merge(
@@ -474,13 +431,13 @@ JS
         );
 
         $allOptions = [
-            'theme' => '',
-            'footer_type' => '',
-            'body_class' => '',
-            'sidebar_dark' => '',
+            'theme'             => '',
+            'footer_type'       => '',
+            'body_class'        => '',
+            'sidebar_dark'      => '',
             'sidebar_collapsed' => [true, false],
-            'navbar_color' => ['bg-primary', 'bg-info', 'bg-warning', 'bg-success', 'bg-danger', 'bg-dark'],
-            'navbar_class' => ['floating' => 'floating-nav', 'sticky' => 'fixed-top', 'hidden' => 'd-none'],
+            'navbar_color'      => ['bg-primary', 'bg-info', 'bg-warning', 'bg-success', 'bg-danger', 'bg-dark'],
+            'navbar_class'      => ['floating' => 'floating-nav', 'sticky' => 'fixed-top', 'hidden' => 'd-none'],
         ];
 
         $maps = [
@@ -511,13 +468,13 @@ JS
         }
 
         return [
-            'theme' => $data['theme'],
+            'theme'             => $data['theme'],
             'sidebar_collapsed' => $data['sidebar_collapsed'],
-            'navbar_color' => $data['navbar_color'],
-            'navbar_class' => $allOptions['navbar_class'][$data['navbar_class']],
-            'sidebar_class' => $data['sidebar_collapsed'] ? 'sidebar-collapse' : '',
-            'body_class' => $data['body_class'],
-            'sidebar_dark' => $data['sidebar_dark'],
+            'navbar_color'      => $data['navbar_color'],
+            'navbar_class'      => $allOptions['navbar_class'][$data['navbar_class']],
+            'sidebar_class'     => $data['sidebar_collapsed'] ? 'sidebar-collapse' : '',
+            'body_class'        => $data['body_class'],
+            'sidebar_dark'      => $data['sidebar_dark'],
         ];
     }
 
@@ -531,13 +488,11 @@ JS
         $this->callComposing();
         $this->shareDefaultErrors();
 
-        $variables = $this->variables();
+        $this->variables['content'] = $this->build();
 
         $this->callComposed();
 
-        $this->addPerfectScrollbarScript();
-
-        return view($this->view, $variables)->render();
+        return view($this->view, $this->variables())->render();
     }
 
     /**

部分文件因文件數量過多而無法顯示