Kaynağa Gözat

:construction: wip

jqh 5 yıl önce
ebeveyn
işleme
2495fe5a84

+ 2 - 2
config/admin.php

@@ -274,8 +274,8 @@ return [
     | This value is the layout of admin pages.
     */
     'layout' => [
-        // indigo, blue, blue-light, blue-dark, green
-        'color' => 'indigo',
+        // default, blue, blue-light, blue-dark, green
+        'color' => 'default',
 
         'body_class' => '',
 

+ 6 - 5
resources/assets/dcat/js/Dcat.js

@@ -3,6 +3,7 @@ import Helpers from './extensions/Helpers'
 import Translator from './extensions/Translator'
 
 let $ = jQuery,
+    $document = $(document),
     pjaxResponded = false,
     bootingCallbacks = [],
     actions = {},
@@ -104,7 +105,7 @@ export default class Dcat {
         }
 
         $(() => {
-            $(document).trigger('pjax:loaded');
+            $document.trigger('pjax:loaded');
         });
     }
 
@@ -155,10 +156,10 @@ export default class Dcat {
         once = once === undefined ? true : once;
 
         if (once) {
-            return $(document).one('pjax:loaded', callback);
+            return $document.one('pjax:loaded', callback);
         }
 
-        return $(document).on('pjax:loaded', callback);
+        return $document.on('pjax:loaded', callback);
     }
 
     /**
@@ -172,10 +173,10 @@ export default class Dcat {
         once = once === undefined ? true : once;
 
         if (once) {
-            return $(document).one('pjax:complete', callback);
+            return $document.one('pjax:complete', callback);
         }
 
-        return $(document).on('pjax:complete', callback);
+        return $document.on('pjax:complete', callback);
     }
 
     withConfig(config) {

+ 7 - 7
resources/assets/dcat/js/extensions/AssetsLoader.js

@@ -7,10 +7,10 @@ export default class AssetsLoader {
 
         Dcat.assets = {
             // 加载js脚本,并触发 ready 事件
-            loadScripts: _this.load.bind(_this),
+            load: _this.load.bind(_this),
 
             // 从给定的内容中过滤"<script>"标签内容,并自动加载其中的js脚本
-            executeScripts: _this.executeScripts.bind(_this)
+            resolveHtml: _this.resolveHtml.bind(_this)
         };
     }
 
@@ -58,7 +58,7 @@ export default class AssetsLoader {
     }
     
     // 返回过滤 <script src> 标签后的内容,并在加载完 script 脚本后触发 "pjax:script" 事件
-    executeScripts(content, callback) {
+    resolveHtml(content, callback) {
         var obj = this.filterScripts(content);
 
         this.load(obj.js, function () {
@@ -68,12 +68,12 @@ export default class AssetsLoader {
         return obj.contents;
     }
 
-    findAll(elems, selector) {
-        if (typeof elems == 'string') {
-            elems = $(elems);
+    findAll($el, selector) {
+        if (typeof $el === 'string') {
+            $el = $($el);
         }
 
-        return elems.filter(selector).add(elems.find(selector));
+        return $el.filter(selector).add($el.find(selector));
     }
 
     fire() {

+ 10 - 10
resources/assets/dcat/js/extensions/DialogForm.js

@@ -7,7 +7,7 @@ if (top && w.layer) {
 
 export default class DialogForm {
     constructor(Dcat, options) {
-        let _this = this, nullFun = function (a, b) {};
+        let _this = this, nullFun = function () {};
 
         _this.options = $.extend({
             // 弹窗标题
@@ -47,8 +47,8 @@ export default class DialogForm {
         _this._counter = 1;
         _this._idx = {};
         _this._dialogs = {};
-        _this.isLoading = 0;
-        _this.isSubmitting = 0;
+        _this.rendering = 0;
+        _this.submitting = 0;
 
         _this.init(options)
     }
@@ -92,7 +92,7 @@ export default class DialogForm {
         let _this = this,
             $btn = _this.$target;
 
-        if (! url || _this.isLoading) {
+        if (! url || _this.rendering) {
             return;
         }
 
@@ -112,7 +112,7 @@ export default class DialogForm {
             _this._destroy(counter);
         });
 
-        _this.isLoading = 1;
+        _this.rendering = 1;
 
         $btn && $btn.buttonLoading();
 
@@ -122,7 +122,7 @@ export default class DialogForm {
         $.ajax({
             url: url,
             success: function (template) {
-                _this.isLoading = 0;
+                _this.rendering = 0;
                 Dcat.NP.done();
 
                 if ($btn) {
@@ -144,7 +144,7 @@ export default class DialogForm {
             options = _this.options;
 
         // 加载js代码
-        template = Dcat.assets.executeScripts(template).render();
+        template = Dcat.assets.resolveHtml(template).render();
         
         let btns = [options.lang.submit],
             dialogOpts = {
@@ -207,7 +207,7 @@ export default class DialogForm {
             counter = _this.$target.attr('counter'),
             $submitBtn = _this._dialogs[counter].find('.layui-layer-btn0');
 
-        if (_this.isSubmitting) {
+        if (_this.submitting) {
             return;
         }
 
@@ -223,14 +223,14 @@ export default class DialogForm {
                     return false;
                 }
 
-                _this.isSubmitting = 1;
+                _this.submitting = 1;
 
                 $submitBtn.buttonLoading();
             },
             after: function (success, res) {
                 $submitBtn.buttonLoading(false);
 
-                _this.isSubmitting = 0;
+                _this.submitting = 0;
 
                 if (options.saved(success, res) === false) {
                     return false;

+ 1 - 3
resources/assets/dcat/js/extensions/Helpers.js

@@ -251,9 +251,7 @@ export default class Helpers {
 
         $.ajax(url).then(function (data) {
             done(
-                Dcat.assets.executeScripts(data, function () {
-                    Dcat.triggerReady();
-                }).render()
+                Dcat.assets.resolveHtml(data, Dcat.triggerReady).render()
             );
         }, function (a, b, c) {
             if (error) {

+ 2 - 2
resources/assets/dcat/sass/components/_button.scss

@@ -109,8 +109,8 @@ a.btn-sm, .btn-group-sm > a.btn {
 
 .btn.btn-white, .btn.btn-default {
   color: $font-color;
-  box-shadow: none;
-  background: darken(#f2f2f3, 1%);
+  box-shadow: $default-btn-shadow;
+  background: $white;
 }
 
 //.btn.btn-white.btn-shadow, .btn.btn-default.btn-shadow {

+ 33 - 275
resources/assets/dcat/sass/components/_custom-data-table.scss

@@ -19,7 +19,7 @@ $table-border-radius: .3rem;
   margin-right: .75rem
 }
 
-.custom-data-table-header .table-responsive .top .action-btns .actions-dropodown .dropdown-toggle{
+.custom-data-table-header .table-responsive .top .action-btns .actions-dropodown .dropdown-toggle {
   font-size: 1.125rem;
   font-weight: 500
 }
@@ -32,23 +32,6 @@ $table-border-radius: .3rem;
   padding: .9rem .938rem
 }
 
-.custom-data-table-header .table-responsive .top .dataTables_length {
-  display: inline-block
-}
-
-.custom-data-table-header .table-responsive .top .dataTables_length .custom-select {
-  width: 8.714rem;
-  height: 3rem;
-  border-radius: 1.428rem;
-  border: 1px solid #dae1e7;
-  font-size: 1rem;
-  background-position: calc(100% - 12px) 13px, calc(100% - 20px) 13px, 100% 0
-}
-
-.custom-data-table-header .table-responsive .top .dataTables_length .custom-select:focus{
-  box-shadow: none
-}
-
 .table-responsive .table-filter {
   display: inline-block
 }
@@ -57,23 +40,24 @@ $table-border-radius: .3rem;
   padding: 1.25rem 2.8rem !important;
   border-radius: 5rem;
   border: 0;
-  background: darken(#f2f2f3, 0.5%);//lighten(#f0f0f0, 1%);
+  background: $white;//lighten(#f0f0f0, 1%);
+  box-shadow: $shadow;
   font-size: .82rem;
 }
 /* #eef1f4; */
 
-.table-filter .form-control:focus {
-  background: #fff;
-  border: 2px solid $primary;
-  padding: 1.12rem 2.8rem !important;
-  box-shadow: none;
-}
+//.table-filter .form-control:focus {
+//  background: #fff;
+//  border: 2px solid $primary;
+//  padding: 1.12rem 2.8rem !important;
+//  box-shadow: none;
+//}
 
-.table-filter label{
+.table-filter label {
   position: relative
 }
 
-.table-filter label:after{
+.table-filter label:after {
   content: "\E8BD";
   font-family: feather;
   position: absolute;
@@ -84,98 +68,23 @@ $table-border-radius: .3rem;
   color: $dark70;
 }
 
-.custom-data-table-header .table-responsive .dataTables_wrapper .dataTables_paginate ul.pagination {
-  justify-content: center
-}
-
-.custom-data-table-header .add-new-data-sidebar .overlay-bg{
-  background: rgba(0, 0, 0, .2);
-  width: 100%;
-  height: 100%;
-  position: fixed;
-  top: 0;
-  left: 0;
-  display: none;
-  transition: all .3s ease;
-  opacity: 0;
-  z-index: 1032
-}
-
-.custom-data-table-header .add-new-data-sidebar .overlay-bg.show{
-  opacity: 1;
-  display: block
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data {
-  width: 28.57rem;
-  max-width: 90vw;
-  height: 100vh;
-  height: calc(var(--vh, 1vh) * 100);
-  background: #fff;
-  position: fixed;
-  left: auto;
-  right: 0;
-  top: 0;
-  z-index: 1033;
-  box-shadow: 0 0 15px 0 rgba(0, 0, 0, .05);
-  transform: translateX(100%);
-  transition: all .25s ease;
-  overflow: hidden
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data.show {
-  transform: translateX(0)
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data .new-data-title {
-  padding-bottom: .714rem;
-  border-bottom: 1px solid rgba(0, 0, 0, .1)
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data .new-data-title .hide-data-sidebar {
-  position: relative
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data .new-data-title .hide-data-sidebar i {
-  position: absolute;
-  font-size: 1.71rem;
-  right: 0;
-  top: -.1428rem;
-  cursor: pointer
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data .data-items {
-  border-bottom: 1px solid rgba(0, 0, 0, .1);
-  height: calc(100vh - 10rem);
-  position: relative
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data .data-items .data-field-col {
-  margin-top: 1.25rem
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data .data-items .data-field-col.data-list-upload {
-  margin-top: 2rem
-}
 
-.custom-data-table-header .add-new-data-sidebar .add-new-data .data-items .data-field-col .dropzone {
-  min-height: 14.285rem
-}
-
-.custom-data-table-header .add-new-data-sidebar .add-new-data .data-items .data-field-col .dropzone .dz-message {
-  height: auto
+table.custom-data-table.data-table {
+  border-spacing: 0 .8rem;
+  padding: 0;
 }
 
-.custom-data-table-header .add-new-data-sidebar .add-new-data .data-items .data-field-col .dropzone .dz-message:before {
-  font-size: 2.857rem
-}
+//table.custom-data-table {
+//  background: #ededf1;
+//  border-radius: $card-border-radius;
+//  box-shadow: $shadow;
+//}
 
-table.custom-data-table.dataTable {
-  border-spacing: 0 .8rem;
-  padding: 0;
+table.custom-data-table tbody tr {
+  background: $white;
 }
 
-table.custom-data-table.dataTable thead th {
+table.custom-data-table.data-table thead th {
   //padding: .714rem 1.785rem;
   padding: 0.714rem .51rem;
   font-weight: 600;
@@ -183,67 +92,16 @@ table.custom-data-table.dataTable thead th {
   border-top: 0;
 }
 
-table.custom-data-table.dataTable thead th input:focus {
+table.custom-data-table.data-table thead th input:focus {
   outline: 0
 }
 
-table.custom-data-table.dataTable thead th:first-child {
+table.custom-data-table.data-table thead th:first-child {
   //padding-left: 0;
   padding-left: .9rem;
 }
 
-table.custom-data-table.dataTable thead .dt-checkboxes-select-all input {
-  width: 0;
-  position: relative
-}
-
-table.custom-data-table.dataTable thead .dt-checkboxes-select-all input:before {
-  border: 2px solid #b4b4b4;
-  content: "";
-  width: 1.071rem;
-  height: 1.071rem;
-  padding: 0;
-  border-radius: 2px;
-  transform: rotate(-90deg);
-  overflow: hidden;
-  transition: all .2s ease;
-  position: absolute
-}
-
-table.custom-data-table.dataTable thead .dt-checkboxes-select-all input:after {
-  background-color: $primary;
-  border: 2px solid $primary;
-  font-family: feather;
-  content: "\E83F";
-  font-size: .75rem;
-  line-height: 1.2;
-  color: #fff;
-  opacity: 0;
-  position: absolute;
-  width: .928rem;
-  height: 1rem;
-  transform: translate(100%);
-  transform-origin: right;
-  transition: all .2s ease;
-  overflow: hidden
-}
-
-table.custom-data-table.dataTable thead .dt-checkboxes-select-all input:active:checked:after {
-  transform: translate(3px)
-}
-
-table.custom-data-table.dataTable thead .dt-checkboxes-select-all input:checked:before {
-  border: 2px solid $primary;
-  transform: rotate(0deg)
-}
-
-table.custom-data-table.dataTable thead .dt-checkboxes-select-all input:checked:after {
-  transition: all .2s ease;
-  opacity: 1;
-  transform: translate(0)
-}
-
-table.custom-data-table.dataTable tbody tr {
+table.custom-data-table.data-table tbody tr {
   background-color: #fff;
   //box-shadow: 0 4px 20px 0 rgba(0, 0, 0, .05);
   box-shadow: $shadow;
@@ -252,29 +110,29 @@ table.custom-data-table.dataTable tbody tr {
   border-radius:$table-border-radius
 }
 
-table.custom-data-table.dataTable tbody tr:hover {
+table.custom-data-table.data-table tbody tr:hover {
   //transform: translateY(-4px);
   //transition: all .3s ease;
   //transform: none;
   background: lighten($dark30, 1%);
 }
 
-table.custom-data-table.dataTable tbody tr td:first-child {
+table.custom-data-table.data-table tbody tr td:first-child {
   padding-left: 1rem;
   border-top-left-radius: $table-border-radius;
   border-bottom-left-radius: $table-border-radius
 }
 
-table.custom-data-table.dataTable tbody tr td:last-child {
+table.custom-data-table.data-table tbody tr td:last-child {
   border-top-right-radius:$table-border-radius;
   border-bottom-right-radius:$table-border-radius
 }
 
-table.custom-data-table.dataTable tbody tr.selected td {
+table.custom-data-table.data-table tbody tr.selected td {
   border-radius: 0
 }
 
-table.custom-data-table.dataTable tbody td {
+table.custom-data-table.data-table tbody td {
   //padding: 1.357rem;
   border: none;
   vertical-align: middle;
@@ -283,115 +141,15 @@ table.custom-data-table.dataTable tbody td {
   line-height: 1.42857;
 }
 
-table.custom-data-table.dataTable tbody td input:focus {
+table.custom-data-table.data-table tbody td input:focus {
   outline: 0
 }
 
-table.custom-data-table.dataTable tbody td.product-name {
-  font-weight: 500
-}
-
-table.custom-data-table.dataTable tbody td:focus {
+table.custom-data-table.data-table tbody td:focus {
   outline: 0
 }
 
-table.custom-data-table.dataTable tbody td.dt-checkboxes-cell input {
-  width: 0;
-  position: relative
-}
-
-table.custom-data-table.dataTable tbody td.dt-checkboxes-cell input:before {
-  border: 2px solid #b4b4b4;
-  position: absolute;
-  left: -8px;
-  content: "";
-  width: 1.071rem;
-  height: 1.071rem;
-  padding: 0;
-  border-radius: 2px;
-  transform: rotate(-90deg);
-  overflow: hidden;
-  transition: all .2s ease
-}
-
-table.custom-data-table.dataTable tbody td.dt-checkboxes-cell input:after {
-  background-color: $primary;
-  font-family: feather;
-  content: "\E83F";
-  font-size: .75rem;
-  color: #fff;
-  opacity: 0;
-  position: absolute;
-  left: -.4285rem;
-  width: .857rem;
-  height: 1rem;
-  overflow: hidden;
-  transform: rotate(-90deg) translate(100%);
-  transform-origin: right;
-  transition: all .2s ease
-}
-
-table.custom-data-table.dataTable tbody td.dt-checkboxes-cell input:active:checked:after {
-  transform: translate(3px)
-}
-
-table.custom-data-table.dataTable tbody td.dt-checkboxes-cell input:checked:before {
-  transform: rotate(0deg);
-  border: 2px solid $primary;
-  transition: all .2s ease
-}
-
-table.custom-data-table.dataTable tbody td.dt-checkboxes-cell input:checked:after {
-  opacity: 1;
-  transition: all .2s ease;
-  transform: rotate(0deg) translate(0)
-}
-
-table.custom-data-table.dataTable tbody td .progress {
+table.custom-data-table.data-table tbody td .progress {
   margin-bottom: 0;
   box-shadow: 0 4px 8px 0 rgba(0, 0, 0, .12), 0 2px 4px 0 rgba(0, 0, 0, .08)
 }
-
-
-@media (max-width: 576px) {
-  .add-new-data-sidebar .data-items .data-list-upload .dropzone .dz-message:before {
-    top: 3.428rem
-  }
-}
-
-.custom-data-table.dataTable tbody tr td.dt-checkboxes-cell input, .custom-data-table.dataTable tbody tr th.dt-checkboxes-cell input, .custom-data-table.dataTable thead tr td.dt-checkboxes-cell input, .custom-data-table.dataTable thead tr th.dt-checkboxes-cell input, _:-ms-lang(x) tbody tr td.dt-checkboxes-cell input, _:-ms-lang(x) tbody tr th.dt-checkboxes-cell input, _:-ms-lang(x) thead tr td.dt-checkboxes-cell input, _:-ms-lang(x) thead tr th.dt-checkboxes-cell input {
-  width: auto
-}
-
-.custom-data-table.dataTable .table-responsive .top .table-filter .form-control _:-ms-lang(x) .table-responsive .top .table-filter .form-control {
-  height: 1.4rem !important;
-  padding: 0 .5rem !important
-}
-
-.custom-data-table.dataTable .table-responsive .top .table-filter .form-control:after _:-ms-lang(x) .table-responsive .top .table-filter .form-control:after {
-  display: none
-}
-
-
-@supports (-moz-osx-font-smoothing:auto) {
-  .custom-data-table input {
-    width: auto !important
-  }
-}
-
-@media not all and (min-resolution: 0.001dpcm) {
-  @supports (-webkit-appearance:none) {
-    table.custom-data-table tbody td.dt-checkboxes-cell input:after {
-      left: -.485rem
-    }
-    .custom-data-table .dt-checkboxes-cell input {
-      -webkit-appearance: none;
-      top: -10px
-    }
-  }
-}
-
-.custom-data-table .mac-checkbox {
-  -webkit-appearance: none;
-  top: -10px
-}

+ 1 - 0
resources/assets/dcat/sass/components/_form.scss

@@ -99,6 +99,7 @@ select.form-control:not([multiple=multiple]) {
 
 .input-group-prepend .input-group-text {
   margin-right: -1px;
+  max-height: $input-height;
 }
 
 // --------------------- input-group-addon ---------------------

+ 3 - 3
resources/assets/dcat/sass/components/_grid.scss

@@ -116,11 +116,11 @@ body:not(.dark-mode) .simple-grid {
       background: transparent;
     }
 
-    .custom-data-table.dataTable tbody td {
+    .custom-data-table.data-table tbody td {
       height: 35px;
     }
 
-    .custom-data-table.dataTable thead th {
+    .custom-data-table.data-table thead th {
       height: 20px;
     }
 
@@ -130,7 +130,7 @@ body:not(.dark-mode) .simple-grid {
       border-bottom: 1px solid $table-border-color;
     }
 
-    table.dataTable thead tr:last-child th {
+    table.data-table thead tr:last-child th {
       border-bottom: 2px solid $table-border-color;
     }
   }

+ 31 - 26
resources/assets/dcat/sass/components/_table.scss

@@ -18,7 +18,7 @@
   }
 }
 
-table.dataTable thead tr {
+table.data-table thead tr {
   background: transparent;
 }
 
@@ -32,15 +32,15 @@ table.dataTable thead tr {
   //border-top: 1px solid $table-border-color!important;
 }
 
-table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td {
+table.data-table thead th, table.data-table thead td, table.data-table tfoot th, table.data-table tfoot td {
   font-size: .9rem!important;
 }
 
-table.dataTable:not(.table-bordered) thead tr th {
+table.data-table:not(.table-bordered) thead tr th {
   text-transform: capitalize;
 }
 
-table.dataTable {
+table.data-table {
   border: 0;
 }
 
@@ -81,37 +81,37 @@ table.dataTable {
 // 解决 rwd-table 下拉选框显示bug
 
 
-table.table-bordered.dataTable:not(.complex-headers) tbody th, table.table-bordered.dataTable tbody td {
+table.table-bordered.data-table:not(.complex-headers) tbody th, table.table-bordered.data-table tbody td {
   border-bottom-width: 1px
 }
-table.table-bordered.dataTable th:not(.complex-headers), table.table-bordered.dataTable td {
+table.table-bordered.data-table th:not(.complex-headers), table.table-bordered.data-table td {
   border-left-width: 1px;
 }
-table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable td:last-child, table.table-bordered.dataTable td:last-child {
+table.table-bordered.data-table th:last-child, table.table-bordered.data-table th:last-child, table.table-bordered.data-table td:last-child, table.table-bordered.data-table td:last-child {
   border-right-width: 1px;
 }
 
-table.dataTable.complex-headers {
+table.data-table.complex-headers {
   border: 1px solid $table-border-color;
 }
-table.dataTable.complex-headers thead th, table.dataTable.complex-headers thead td, table.dataTable.complex-headers tfoot th, table.dataTable.complex-headers tfoot td {
+table.data-table.complex-headers thead th, table.data-table.complex-headers thead td, table.data-table.complex-headers tfoot th, table.data-table.complex-headers tfoot td {
   border-bottom: 1px solid $table-border-color;
   border-right: 1px solid $table-border-color;
 }
 
-.dataTable.table-bordered:not(.complex-headers) thead th {
+.data-table.table-bordered:not(.complex-headers) thead th {
   border-right: 1px solid darken($border-color, 3%);
   border-bottom: 1px solid darken($border-color, 3%);
 }
-.dataTable.table-bordered:not(.complex-headers) tr:first-child th {
+.data-table.table-bordered:not(.complex-headers) tr:first-child th {
   border-top: 1px solid darken($border-color, 3%);
 }
-.dataTable.table-bordered:not(.complex-headers) thead tr th:first-child {
+.data-table.table-bordered:not(.complex-headers) thead tr th:first-child {
   border-left: 1px solid darken($border-color, 3%);
 }
 
 /* ------------------- 多表头 --------------------- */
-table.table-bordered.dataTable.complex-headers {
+table.table-bordered.data-table.complex-headers {
   border-spacing: 0;
   margin-top: 12px!important;
   box-shadow: $shadow;
@@ -178,26 +178,26 @@ table.table-bordered.dataTable.complex-headers {
 $table-border-color: #eff3f8;
 
 .table-collapse {
-  .custom-data-table.dataTable tbody tr td:first-child {
+  .custom-data-table.data-table tbody tr td:first-child {
     border-top-left-radius: 0;
     border-bottom-left-radius: 0;
   }
-  .custom-data-table.dataTable tbody tr td:last-child{
+  .custom-data-table.data-table tbody tr td:last-child{
     border-top-right-radius: 0;
     border-bottom-right-radius: 0;
   }
 
-  .custom-data-table.dataTable tbody tr:first-child td:first-child {
+  .custom-data-table.data-table tbody tr:first-child td:first-child {
     border-top-left-radius: $card-border-radius;
   }
-  .custom-data-table.dataTable tbody tr:first-child td:last-child{
+  .custom-data-table.data-table tbody tr:first-child td:last-child{
     border-top-right-radius: $card-border-radius;
   }
 
-  .custom-data-table.dataTable tbody tr:last-child td:first-child {
+  .custom-data-table.data-table tbody tr:last-child td:first-child {
     border-bottom-left-radius: $card-border-radius;
   }
-  .custom-data-table.dataTable tbody tr:last-child td:last-child{
+  .custom-data-table.data-table tbody tr:last-child td:last-child{
     border-bottom-right-radius: $card-border-radius;
   }
 
@@ -217,40 +217,45 @@ $table-border-color: #eff3f8;
 }
 
 
-$table-bg: darken(#f7f7f9, 3.5%);
+//$table-bg: darken(#f7f7f9, 3.5%);
+$table-bg: $white;
 
 body:not(.dark-mode) {
   .table-collapse {
     box-shadow: $shadow;
     background: $table-bg;
     margin-top: 1rem;
+    //padding: 0 3px 3px;
 
     .custom-data-table {
       border-spacing: 0;
       //border-collapse:collapse!important;
       margin-top: 0!important;
       background-color: $table-bg;
+      border: 1px solid #e1e4e8;
       //border-radius: $card-border-radius;
     }
 
-    table.custom-data-table.dataTable thead th {
+    table.custom-data-table thead th {
       //border-top: 1px solid $table-border-color;
       //border-bottom: 2px solid $table-border-color;
-      height: 24px;
+      height: 36px;
       vertical-align: middle;
+      border-top: 1px solid #e1e4e8;
+      border-bottom: 1px solid #e1e4e8;
       //background: $white;
     }
 
-    .custom-data-table.dataTable tbody td {
+    .custom-data-table tbody td {
       border-top: 1px solid $table-border-color;
       height: 45px;
     }
 
-    .custom-data-table.dataTable tbody tr:first-child td {
+    .custom-data-table tbody tr:first-child td {
       border-top: 0
     }
 
-    table.custom-data-table.dataTable tbody tr {
+    table.custom-data-table tbody tr {
       box-shadow: none;
     }
 
@@ -267,7 +272,7 @@ body.dark-mode {
       border-spacing: 0 0.24rem;
     }
 
-    table.custom-data-table.dataTable tbody td {
+    table.custom-data-table.data-table tbody td {
       height: 38px;
     }
 

+ 3 - 3
resources/assets/dcat/sass/variables/_variables.scss

@@ -22,9 +22,9 @@ $shadow-180: 0 3px 1px -2px rgba(0,0,0,.08), 0 2px 4px 0 rgba(0,0,0,.08), 0 1px
 $shadow-200: 0 3px 1px -2px rgba(0,0,0,.1), 0 2px 2px 0 rgba(0,0,0,.1), 0 1px 5px 1px rgba(0,0,0,.1);
 
 // 按钮阴影颜色
-$btn-white-shadow: 0 3px 1px -2px rgba(0,0,0,.1), 0 2px 2px 0 rgba(0,0,0,.1), 0 1px 5px 0 rgba(0,0,0,.08);
-$default-btn-shadow: 0 2px 4px 0 rgba(0,0,0,.06);
-$btn-shadow: $shadow-100;
+$default-btn-shadow: $shadow-150;
+$btn-white-shadow: $default-btn-shadow;
+$btn-shadow: $default-btn-shadow;
 $btn-shadow-hover: $shadow-200;
 $btn-group-btn-shadow: $btn-shadow;
 

+ 1 - 1
resources/views/grid/data-table.blade.php

@@ -1,5 +1,5 @@
 
-<div class="dcat-box custom-data-table dt-bootstrap4">
+<div class="dcat-box custom-data-table">
 
     @include('admin::grid.table-toolbar')
 

+ 1 - 1
resources/views/grid/fixed-table.blade.php

@@ -1,4 +1,4 @@
-<div class="dcat-box custom-data-table dt-bootstrap4">
+<div class="dcat-box custom-data-table">
     @include('admin::grid.table-toolbar')
 
     {!! $grid->renderFilter() !!}

+ 1 - 1
resources/views/grid/pagination.blade.php

@@ -1,4 +1,4 @@
-<ul class="pagination pagination-sm no-margin pull-right" style="border-radius: 1.5rem">
+<ul class="pagination pagination-sm no-margin pull-right shadow-100" style="border-radius: 1.5rem">
     <!-- Previous Page Link -->
     @if ($paginator->onFirstPage())
     <li class="page-item previous disabled"><span class="page-link"></span></li>

+ 3 - 4
resources/views/grid/table.blade.php

@@ -1,16 +1,15 @@
 
-<div class="card dcat-box dt-bootstrap4">
+<div class="dcat-box">
 
-    <div class="card-header d-block pb-0">
+    <div class="d-block pb-0">
         @include('admin::grid.table-toolbar')
-{{--        <hr class="mb-0" style="margin-top: .6rem" />--}}
     </div>
 
     {!! $grid->renderFilter() !!}
 
     {!! $grid->renderHeader() !!}
 
-    <div class="card-body table-responsive table-wrapper complex-container table-middle">
+    <div class="table-responsive table-collapse table-wrapper complex-container table-middle mt-1">
         <table class="{{ $grid->formatTableClass() }}" id="{{ $tableId }}" >
             <thead>
             @if ($headers = $grid->getComplexHeaders())

+ 2 - 2
src/Color.php

@@ -61,7 +61,7 @@ class Color
 {
     use Macroable;
 
-    const DEFAULT_COLOR = 'indigo';
+    const DEFAULT_COLOR = 'default';
 
     /**
      * 颜色.
@@ -69,7 +69,7 @@ class Color
      * @var array
      */
     protected static $extensions = [
-        'indigo' => [
+        'default' => [
             'colors' => [
                 'primary'        => '#586cb1',
                 'primary-darker' => '#4c60a3',

+ 2 - 2
src/Console/stubs/config.stub

@@ -274,8 +274,8 @@ return [
     | This value is the layout of admin pages.
     */
     'layout' => [
-        // indigo, blue, blue-light, blue-dark, green
-        'color' => 'indigo',
+        // default, blue, blue-light, blue-dark, green
+        'color' => 'default',
 
         'body_class' => '',
 

+ 1 - 1
src/Extend/ServiceProvider.php

@@ -405,7 +405,7 @@ abstract class ServiceProvider extends LaravelServiceProvider
     {
         $menuModel = config('admin.database.menu_model');
 
-        return $result = $menuModel::where('uri', $path)->exists();
+        return $menuModel::where('uri', $path)->exists();
     }
 
     /**

+ 2 - 2
src/Grid.php

@@ -180,7 +180,7 @@ class Grid
         'show_toolbar'           => true,
         'create_mode'            => self::CREATE_MODE_DEFAULT,
         'dialog_form_area'       => ['700px', '670px'],
-        'table_class'            => ['table', 'dt-checkboxes-select'],
+        'table_class'            => ['table', 'custom-data-table'],
     ];
 
     /**
@@ -397,7 +397,7 @@ class Grid
     public function formatTableClass()
     {
         if ($this->options['show_bordered']) {
-            $this->addTableClass(['table-bordered', 'complex-headers', 'dataTable']);
+            $this->addTableClass(['table-bordered', 'complex-headers', 'data-table']);
         }
         if ($this->getComplexHeaders()) {
             $this->addTableClass('table-text-center');

+ 1 - 1
src/Grid/Tools.php

@@ -33,7 +33,7 @@ class Tools implements Renderable
     /**
      * @var bool
      */
-    protected $outline = false;
+    protected $outline = true;
 
     /**
      * Create a new Tools instance.

+ 1 - 1
src/Http/Controllers/MenuController.php

@@ -97,7 +97,7 @@ class MenuController extends AdminController
 
         $relations = $menuModel::withPermission() ? ['permissions', 'roles'] : 'roles';
 
-        return Form::make(new Menu($relations), function (Form $form) use ($menuModel) {
+        return Form::make(Menu::with($relations), function (Form $form) use ($menuModel) {
             $form->tools(function (Form\Tools $tools) {
                 $tools->disableView();
             });

+ 1 - 1
src/Http/Controllers/RoleController.php

@@ -77,7 +77,7 @@ class RoleController extends AdminController
 
     public function form()
     {
-        return Form::make(new Role('permissions'), function (Form $form) {
+        return Form::make(Role::with(['permissions']), function (Form $form) {
             $roleTable = config('admin.database.roles_table');
             $connection = config('admin.database.connection');
 

+ 3 - 3
src/Http/Controllers/UserController.php

@@ -20,7 +20,7 @@ class UserController extends AdminController
 
     protected function grid()
     {
-        return Grid::make(new Administrator('roles'), function (Grid $grid) {
+        return Grid::make(Administrator::with(['roles']), function (Grid $grid) {
             $grid->column('id', 'ID')->sortable();
             $grid->column('username')->prepend(function () {
                 return "<img src='{$this->getAvatar()}' data-action='preview-img' width='40' class='avatar img-circle' /> &nbsp; ";
@@ -70,7 +70,7 @@ class UserController extends AdminController
 
     protected function detail($id)
     {
-        return Show::make($id, new Administrator('roles'), function (Show $show) {
+        return Show::make($id, Administrator::with(['roles']), function (Show $show) {
             $show->field('id');
             $show->field('username');
             $show->field('name');
@@ -122,7 +122,7 @@ class UserController extends AdminController
 
     public function form()
     {
-        return Form::make(new Administrator('roles'), function (Form $form) {
+        return Form::make(Administrator::with(['roles']), function (Form $form) {
             $userTable = config('admin.database.users_table');
 
             $connection = config('admin.database.connection');

+ 0 - 1
src/Support/DatabaseUpdater.php

@@ -13,7 +13,6 @@ use Illuminate\Support\Facades\DB;
  *
  * Executes database migration and seed scripts based on their filename.
  *
- * @package october\database
  * @author Alexey Bobkov, Samuel Georges
  */
 class DatabaseUpdater

+ 0 - 18
src/Widgets/ApexCharts/Chart.php

@@ -24,14 +24,8 @@ class Chart extends Widget
 
     protected $containerSelector;
 
-    protected $options = [];
-
     protected $built = false;
 
-    protected $scripts = [
-        'extend' => 'return options',
-    ];
-
     public function __construct($selector = null, $options = [])
     {
         if ($selector && ! is_string($selector)) {
@@ -208,18 +202,6 @@ class Chart extends Widget
         return $this;
     }
 
-    /**
-     * @param string|\Closure $script
-     *
-     * @return $this
-     */
-    public function extendOptions($script)
-    {
-        $this->scripts['extend'] = value($script);
-
-        return $this;
-    }
-
     /**
      * @return string
      */

+ 2 - 2
src/Widgets/Widget.php

@@ -96,10 +96,10 @@ abstract class Widget implements Renderable
     {
         if ($value === null) {
             return Arr::get($this->options, $key);
-        } else {
-            Arr::set($this->options, $key, $value);
         }
 
+        Arr::set($this->options, $key, $value);
+
         return $this;
     }