Przeglądaj źródła

【我的素材】无限滚动列表高度优化

任一存 4 lat temu
rodzic
commit
03d2acc225
2 zmienionych plików z 2 dodań i 1 usunięć
  1. 1 1
      src/components/table/style.less
  2. 1 0
      src/views/material/style.less

+ 1 - 1
src/components/table/style.less

@@ -28,7 +28,7 @@
   .t-con {
     padding-top: 49px; // 为了能上下滚动,overflow的值不能是visible,导致此元素是个BFC,导致绝对定位的tip在第一行无法显示在此元素区域外,只好让此元素具有padding-top以供第一行的tip显示。
     margin-top: -49px;
-    height: 500px;
+    height: calc(100vh - 325px); // 必须指定高度,element-ui的无限滚动指令才能生效
     overflow: auto;
     .t-item {
       display: flex;

+ 1 - 0
src/views/material/style.less

@@ -63,6 +63,7 @@
       text-align: left;
     }
     .total-number {
+      margin-top: 14px;
       text-align: right;
       font-size: 14px;
       color: #646566;