浏览代码

update widget table

jqh 5 年之前
父节点
当前提交
902f2793ae

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

@@ -33,7 +33,7 @@ table.dataTable {
 
 .table td {
   padding: .55rem;
-  height: 62px;
+  //height: 62px;
   line-height: 1.42857;
 }
 
@@ -141,3 +141,19 @@ table.table-bordered.dataTable.complex-headers {
   color: $font-color;
   background-color: lighten($dark30, 1%);
 }
+
+/*--------------------------------------------------- */
+
+.table.default-table {
+  tr {
+    box-shadow: none!important;
+  }
+
+  td {
+    border-top: 1px solid #f0f4f8!important;
+  }
+}
+
+.table.default-table.table-bordered th, .table.default-table.table-bordered td {
+  border: 1px solid #f0f4f8!important;
+}

文件差异内容过多而无法显示
+ 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


+ 4 - 8
src/Widgets/Table.php

@@ -21,11 +21,6 @@ class Table extends Widget
      */
     protected $rows = [];
 
-    /**
-     * @var array
-     */
-    protected $style = [];
-
     /**
      * @var int
      */
@@ -49,7 +44,7 @@ class Table extends Widget
         $this->setRows($rows);
         $this->setStyle($style);
 
-        $this->class('table '.implode(' ', (array) $this->style), true);
+        $this->class('table default-table');
     }
 
     /**
@@ -130,7 +125,9 @@ class Table extends Widget
      */
     public function setStyle($style = [])
     {
-        $this->style = $style;
+        if ($style) {
+            $this->class(implode(' ', (array) $style), true);
+        }
 
         return $this;
     }
@@ -145,7 +142,6 @@ class Table extends Widget
         $vars = [
             'headers'    => $this->headers,
             'rows'       => $this->rows,
-            'style'      => $this->style,
             'attributes' => $this->formatHtmlAttributes(),
         ];
 

部分文件因为文件数量过多而无法显示