Selaa lähdekoodia

优化Bootstrap-Select组件和Selectpicker组件

Karson 2 vuotta sitten
vanhempi
commit
4865816388

+ 9 - 1
public/assets/css/backend.css

@@ -407,6 +407,9 @@ table.table-template {
   top: 62px;
   right: 12px;
 }
+.bootstrap-select {
+  min-height: 33px;
+}
 .bootstrap-select .msg-box {
   position: absolute;
   right: 0;
@@ -458,6 +461,9 @@ input.selectpage {
   color: transparent;
   pointer-events: none;
 }
+.sp_container {
+  min-height: 33px;
+}
 .sp_container input.selectpage {
   color: inherit;
   pointer-events: inherit;
@@ -1036,9 +1042,11 @@ form.form-horizontal .control-label {
 .bootstrap-table .fa-toggle-on.fa-2x {
   font-size: 1.86em;
 }
-.bootstrap-table .form-commonsearch .form-group {
+.bootstrap-table .form-commonsearch .row > .form-group {
   margin-left: 0;
   margin-right: 0;
+}
+.bootstrap-table .form-commonsearch .row > .form-group > .control-label {
   white-space: nowrap;
 }
 .bootstrap-table .table:not(.table-condensed) > tbody > tr > th,

+ 10 - 1
public/assets/css/frontend.css

@@ -464,6 +464,9 @@ a:focus {
 .input-group > .msg-box.n-right {
   position: absolute;
 }
+.bootstrap-select {
+  min-height: 33px;
+}
 .bootstrap-select .status {
   background: #f0f0f0;
   clear: both;
@@ -479,10 +482,13 @@ a:focus {
   right: 0;
   top: 0;
 }
+.bootstrap-select .bs-placeholder {
+  min-height: 33px;
+}
 select.bs-select-hidden,
 select.selectpicker {
   display: inherit !important;
-  max-height: 31px;
+  max-height: 33px;
   overflow: hidden;
 }
 select.bs-select-hidden[multiple],
@@ -512,6 +518,9 @@ input.selectpage {
   color: transparent;
   pointer-events: none;
 }
+.sp_container {
+  min-height: 33px;
+}
 .sp_container input.selectpage {
   color: inherit;
   pointer-events: inherit;

+ 15 - 6
public/assets/less/backend.less

@@ -22,6 +22,7 @@
 @main-bg: #f1f4f6;
 @panel-intro-bg: darken(@main-bg, 3%);
 @panel-nav-bg: #fff;
+@input-min-height: 33px;
 
 html,
 body {
@@ -210,6 +211,7 @@ table.table-template {
         right: 0;
         top: 0;
     }
+
     .status {
         background: #f0f0f0;
         clear: both;
@@ -222,17 +224,19 @@ table.table-template {
     }
 
     .bs-placeholder {
-        min-height: 33px;
+        min-height: @input-min-height;
     }
+
+    min-height: @input-min-height;
 }
 
 select.bs-select-hidden, select.selectpicker {
     display: inherit !important;
-    max-height: 33px;
+    max-height: @input-min-height;
     overflow: hidden;
 
     &[multiple] {
-        height: 33px;
+        height: @input-min-height;
         //visibility: hidden;
         padding: 0;
         background: #f4f4f4;
@@ -276,6 +280,8 @@ input.selectpage {
             }
         }
     }
+
+    min-height: @input-min-height;
 }
 
 .img-center {
@@ -963,10 +969,13 @@ form.form-horizontal .control-label {
     font-size: 1.86em;
 }
 
-.bootstrap-table .form-commonsearch .form-group {
+.bootstrap-table .form-commonsearch .row > .form-group {
     margin-left: 0;
     margin-right: 0;
-    white-space: nowrap;
+
+    > .control-label {
+        white-space: nowrap;
+    }
 }
 
 .bootstrap-table .table:not(.table-condensed) > tbody > tr > th,
@@ -1325,7 +1334,7 @@ table.table-nowrap {
 
         .toolbar {
             .btn {
-                min-height: 33px;
+                min-height: @input-min-height;
             }
 
             a.btn-refresh, a.btn-del, a.btn-add, a.btn-edit, a.btn-import, a.btn-more, a.btn-recyclebin, .btn-mini-xs, .btn-multi {

+ 8 - 1
public/assets/less/frontend.less

@@ -18,6 +18,7 @@
 
 @primary-color: #007bff;
 //@primary-color: #2d76d9;
+@input-min-height: 33px;
 
 .clearfix() {
     &:before,
@@ -282,11 +283,16 @@ a {
         top: 0;
     }
 
+    .bs-placeholder {
+        min-height: @input-min-height;
+    }
+
+    min-height: @input-min-height;
 }
 
 select.bs-select-hidden, select.selectpicker {
     display: inherit !important;
-    max-height: 31px;
+    max-height: @input-min-height;
     overflow: hidden;
 
     &[multiple] {
@@ -334,6 +340,7 @@ input.selectpage {
             }
         }
     }
+    min-height: @input-min-height;
 }
 
 /*修复radio和checkbox样式对齐*/