Browse Source

自适应列

Karsa 1 year ago
parent
commit
1923dba7b5
1 changed files with 6 additions and 5 deletions
  1. 6 5
      src/components/sheet.vue

+ 6 - 5
src/components/sheet.vue

@@ -79,19 +79,20 @@ const props = defineProps({
   margin: 0 auto;
   // margin-right: -5px;
   overflow: hidden;
-  overflow-x: auto;
+  // overflow-x: auto;
 }
 table {
   width: 100%;
   font-size: 14px;
   color: #666;
+  table-layout: fixed;
   td,
   th {
-    // width: 120px;
-    min-width: 120px;
-    // word-break: break-all;
+    // min-width: 120px;
+    word-break: break-all;
+    word-wrap: break-word;
     border: 1px solid #dcdfe6;
-    height: 40px;
+    // height: 40px;
     text-align: center;
     background-color: #fff;
     border-left: none;