Browse Source

滚动条样式优化

jqh 4 years ago
parent
commit
514bbd2a72

+ 10 - 0
resources/assets/dcat/sass/dcat-app.scss

@@ -15,6 +15,8 @@
 // sweetalert弹窗
 @import "./sweetalert/sweetalert2";
 
+@import "./mixins/scrollbar";
+
 html {
   font-size: 14px;
   height: 100%;
@@ -30,6 +32,14 @@ html body {
   background: $body-bg;
 }
 
+// 滚动条
+@include scrollbar('body');
+@include scrollbar('.table-main');
+@include scrollbar('.table-responsive[data-pattern=priority-columns]');
+@include scrollbar('.select2-container--default .select2-results>.select2-results__options');
+@include scrollbar('.layui-layer-page .layui-layer-content');
+@include scrollbar('.iconpicker .iconpicker-items');
+
 // 字体
 body, .header-navbar, .navigation, .breadcrumb, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
   font-family: $font-family-sans-serif;

+ 13 - 0
resources/assets/dcat/sass/mixins/_scrollbar.scss

@@ -0,0 +1,13 @@
+
+@mixin scrollbar($selector) {
+  #{$selector}::-webkit-scrollbar {
+    width: 12px;
+  }
+  #{$selector}::-webkit-scrollbar-track {
+    background-color: #eee;
+  }
+  #{$selector}::-webkit-scrollbar-thumb {
+    background-color: darken(#ddd, 8%);
+    border-radius: .4rem;
+  }
+}

+ 11 - 0
resources/assets/dcat/sass/theme/_dark.scss

@@ -831,4 +831,15 @@ body.dark-mode {
   .dcat-done-step .st-desc {
     color: $body-dark-font-color;
   }
+
+  // ------- fixed-columns
+  @include dark-scrollbar('.table-main');
+
+  .table-fixed-left {
+    box-shadow: 6px 0 5px -5px rgba(0,0,0,.24);
+  }
+
+  .table-fixed-right {
+    box-shadow: -5px 0 5px -5px rgba(0,0,0,.24);
+  }
 }

File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/css/dcat-app-blue-dark.css


File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/css/dcat-app-blue-light.css


File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/css/dcat-app-blue.css


File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/css/dcat-app-green.css


File diff suppressed because it is too large
+ 0 - 0
resources/dist/dcat/css/dcat-app.css


+ 1 - 1
src/Controllers/AdminController.php

@@ -57,7 +57,7 @@ class AdminController extends Controller
     public function index(Content $content)
     {
         if (request(IFrameGrid::QUERY_NAME)) {
-            return $content->perfectScrollbar()->body($this->iFrameGrid());
+            return $content->body($this->iFrameGrid());
         }
 
         return $content

+ 1 - 1
src/Grid/FixColumns.php

@@ -169,7 +169,7 @@ class FixColumns
         var height = ($(window).height() - 210);
         
         $('.table-main,.table-fixed').css({height: height + 'px'});
-        $('.table-fixed-right').css({right: '15px'});
+        $('.table-fixed-right').css({right: '12px'});
         $('.table-fixed-right,.table-fixed-left').css({height: (height - 16) + 'px'});
         
         $('.table-main').scroll(function () {

Some files were not shown because too many files changed in this diff