Browse Source

优化默认生成的CRUD列表中TD不换行
优化通用搜索显示

Karson 7 years ago
parent
commit
4bb1cbd2dd

+ 1 - 1
application/admin/command/Crud/stubs/index.stub

@@ -20,7 +20,7 @@
                             </ul>
                         </div>
                     </div>
-                    <table id="table" class="table table-striped table-bordered table-hover" 
+                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                            data-operate-edit="{:$auth->check('{%controllerUrl%}/edit')}" 
                            data-operate-del="{:$auth->check('{%controllerUrl%}/del')}" 
                            width="100%">

+ 5 - 4
public/assets/css/backend.css

@@ -652,10 +652,7 @@ form.form-horizontal .control-label {
 .bootstrap-table .form-commonsearch .form-group {
   margin-left: 0;
   margin-right: 0;
-}
-.bootstrap-table .form-commonsearch .form-group > .control-label {
-  padding-left: 0;
-  padding-right: 0;
+  white-space: nowrap;
 }
 .toolbar {
   margin-top: 10px;
@@ -676,6 +673,10 @@ form.form-horizontal .control-label {
 .bootstrap-table td.bs-checkbox {
   vertical-align: middle;
 }
+table.table-nowrap tbody > tr > td,
+table.table-nowrap thead > tr > th {
+  white-space: nowrap;
+}
 .fixed-table-container thead th .sortable {
   padding-right: 0;
 }

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


+ 7 - 4
public/assets/less/backend.less

@@ -738,10 +738,7 @@ form.form-horizontal .control-label {
 .bootstrap-table .form-commonsearch .form-group {
   margin-left: 0;
   margin-right: 0;
-  > .control-label {
-    padding-left:0;
-    padding-right:0;
-  }
+  white-space: nowrap;
 }
 
 .toolbar {
@@ -766,6 +763,12 @@ form.form-horizontal .control-label {
   vertical-align: middle;
 }
 
+table.table-nowrap {
+  tbody > tr > td, thead > tr > th {
+    white-space: nowrap;
+  }
+}
+
 .fixed-table-container thead th .sortable {
   padding-right: 0;
 }