From 4865816388af8a8823a37d305bf8b502814eb80a Mon Sep 17 00:00:00 2001 From: Karson Date: Fri, 7 Apr 2023 10:54:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96Bootstrap-Select=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=92=8CSelectpicker=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/assets/css/backend.css | 10 +++++++++- public/assets/css/frontend.css | 11 ++++++++++- public/assets/less/backend.less | 21 +++++++++++++++------ public/assets/less/frontend.less | 9 ++++++++- 4 files changed, 42 insertions(+), 9 deletions(-) diff --git a/public/assets/css/backend.css b/public/assets/css/backend.css index a5b8c4a4..c7aa4c03 100644 --- a/public/assets/css/backend.css +++ b/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, diff --git a/public/assets/css/frontend.css b/public/assets/css/frontend.css index 1c1a3bd0..0e437d57 100644 --- a/public/assets/css/frontend.css +++ b/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; diff --git a/public/assets/less/backend.less b/public/assets/less/backend.less index b6e062e4..279c3c15 100644 --- a/public/assets/less/backend.less +++ b/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 { diff --git a/public/assets/less/frontend.less b/public/assets/less/frontend.less index 0c522d2f..ffddbc63 100644 --- a/public/assets/less/frontend.less +++ b/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样式对齐*/