Browse Source

修复多选全部移除后输入框的宽度BUG
优化SelectPage初始化样式

Karson 5 years ago
parent
commit
dfd326a6e1

+ 18 - 0
public/assets/css/backend.css

@@ -173,6 +173,24 @@ select.selectpicker[multiple] option {
     }
   }
 }
+input.selectpage {
+  color: transparent;
+  pointer-events: none;
+}
+.sp_container input.selectpage {
+  color: inherit;
+  pointer-events: inherit;
+  padding-left: 12px;
+  padding-right: 12px;
+}
+.sp_container .sp_element_box input.selectpage {
+  padding-left: 0;
+  padding-right: 0;
+}
+.sp_container .sp_element_box li:first-child input.selectpage {
+  padding-left: 9px;
+  padding-right: 9px;
+}
 .img-center {
   margin: 0 auto;
   display: inline;

File diff suppressed because it is too large
+ 1 - 1
public/assets/css/backend.min.css


+ 57 - 0
public/assets/css/frontend.css

@@ -89,6 +89,63 @@ body {
 .input-group > .msg-box.n-right {
   position: absolute;
 }
+.bootstrap-select .status {
+  background: #f0f0f0;
+  clear: both;
+  color: #999;
+  font-size: 12px;
+  font-weight: 500;
+  line-height: 1;
+  margin-bottom: -5px;
+  padding: 10px 20px;
+}
+select.bs-select-hidden,
+select.selectpicker {
+  display: inherit !important;
+  max-height: 31px;
+  overflow: hidden;
+}
+select.bs-select-hidden[multiple],
+select.selectpicker[multiple] {
+  height: 31px;
+  padding: 0;
+  background: #f4f4f4;
+}
+select.bs-select-hidden[multiple] option,
+select.selectpicker[multiple] option {
+  color: #f4f4f4;
+  zoom: 1;
+  filter: alpha(opacity=0);
+  -webkit-opacity: 0;
+  -moz-opacity: 0;
+  opacity: 0;
+}
+@media not all and (min-resolution: 0.001dpcm) {
+  @supports (-webkit-appearance:none) {
+    select.bs-select-hidden[multiple],
+    select.selectpicker[multiple] {
+      visibility: hidden;
+    }
+  }
+}
+input.selectpage {
+  color: transparent;
+  pointer-events: none;
+}
+.sp_container input.selectpage {
+  color: inherit;
+  pointer-events: inherit;
+  padding-left: 12px;
+  padding-right: 12px;
+}
+.sp_container .sp_element_box input.selectpage {
+  padding-left: 0;
+  padding-right: 0;
+}
+.sp_container .sp_element_box li:first-child input.selectpage {
+  padding-left: 9px;
+  padding-right: 9px;
+}
 /*修复radio和checkbox样式对齐*/
 .radio > label,
 .checkbox > label {

File diff suppressed because it is too large
+ 1 - 1
public/assets/css/frontend.min.css


File diff suppressed because it is too large
+ 1 - 1
public/assets/js/require-backend.min.js


File diff suppressed because it is too large
+ 1 - 1
public/assets/js/require-frontend.min.js


+ 28 - 0
public/assets/less/backend.less

@@ -218,6 +218,34 @@ select.bs-select-hidden, select.selectpicker {
     }
 }
 
+input.selectpage {
+    color: transparent;
+    pointer-events: none;
+}
+
+.sp_container {
+    input.selectpage {
+        color: inherit;
+        pointer-events: inherit;
+        padding-left: 12px;
+        padding-right: 12px;
+    }
+
+    .sp_element_box {
+        input.selectpage {
+            padding-left: 0;
+            padding-right: 0;
+        }
+
+        li:first-child {
+            input.selectpage {
+                padding-left: 9px;
+                padding-right: 9px;
+            }
+        }
+    }
+}
+
 .img-center {
     margin: 0 auto;
     display: inline;

+ 64 - 0
public/assets/less/frontend.less

@@ -106,6 +106,70 @@ body {
     position: absolute;
 }
 
+
+.bootstrap-select .status {
+    background: #f0f0f0;
+    clear: both;
+    color: #999;
+    font-size: 12px;
+    font-weight: 500;
+    line-height: 1;
+    margin-bottom: -5px;
+    padding: 10px 20px;
+}
+
+select.bs-select-hidden, select.selectpicker {
+    display: inherit !important;
+    max-height: 31px;
+    overflow: hidden;
+
+    &[multiple] {
+        height: 31px;
+        //visibility: hidden;
+        padding: 0;
+        background: #f4f4f4;
+
+        option {
+            color: #f4f4f4;
+            .opacity(0);
+        }
+
+        @media not all and (min-resolution: .001dpcm) {
+            @supports (-webkit-appearance:none) {
+                visibility: hidden;
+            }
+        }
+    }
+}
+
+input.selectpage {
+    color: transparent;
+    pointer-events: none;
+}
+
+.sp_container {
+    input.selectpage {
+        color: inherit;
+        pointer-events: inherit;
+        padding-left: 12px;
+        padding-right: 12px;
+    }
+
+    .sp_element_box {
+        input.selectpage {
+            padding-left: 0;
+            padding-right: 0;
+        }
+
+        li:first-child {
+            input.selectpage {
+                padding-left: 9px;
+                padding-right: 9px;
+            }
+        }
+    }
+}
+
 /*修复radio和checkbox样式对齐*/
 .radio, .checkbox {
     > label {