Преглед на файлове

优化部分页面滚动问题

JutarryWu преди 6 месеца
родител
ревизия
383db62d77
променени са 4 файла, в които са добавени 21 реда и са изтрити 31 реда
  1. 2 0
      src/components/list-item.vue
  2. 5 0
      src/style/public.css
  3. 12 30
      src/views/scaleWait.vue
  4. 2 1
      src/views/testPlan/testPlanClassify.vue

+ 2 - 0
src/components/list-item.vue

@@ -64,6 +64,8 @@ export default {
 <style scoped>
 .list-item-warp {
   width: 100%;
+  height: 100%;
+  overflow-y: auto;
 }
 .done-tag {
   margin-right: 10px;

+ 5 - 0
src/style/public.css

@@ -264,3 +264,8 @@
 	box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
 	background: #fff;
 }
+
+
+.app-container {
+	height: 100%
+}

+ 12 - 30
src/views/scaleWait.vue

@@ -1,5 +1,5 @@
 <template>
-  <div style="background: #f0f3f6;height: 100vh">
+  <div class="app-container flex-column" style="background: #f0f3f6;">
     <van-nav-bar
       title="量表测试"
       left-text="返回"
@@ -8,7 +8,7 @@
     />
     <h2 class="title">{{ scaleInfo.name }}</h2>
 
-    <div class="main">
+    <div class="main-area">
       <!--<img class="coverImg" src="../assets/1.jpg" alt="" />-->
       <img class="coverImg" src="../assets/test_records_bg.png" alt="" />
       <p class="desc">{{ scaleInfo.description }}</p>
@@ -19,12 +19,9 @@
           <span>{{ item }}</span>
         </p>
       </div>
-
-    </div>
-    <div class="btnArea">
-      <van-button block round type="info" @click="goTest">开始测试</van-button>
     </div>
 
+    <van-button block round type="info" class="submit-btn" @click="goTest">开始测试</van-button>
   </div>
 </template>
 
@@ -101,8 +98,6 @@ export default {
   color: #333333;
   text-align: center;
   margin-top: 10px;
-
-  //background: #888888;
 }
 
 .desc {
@@ -125,37 +120,24 @@ export default {
 }
 
 .btnArea {
-  //margin: 40px auto;
   position: absolute;
   text-align: center;
   bottom: 0;
-  font-size: 16px;
   color: #FFFFFF;
-  margin: 10px 0;
-  width: 80%;
-  //background: #f0f3f6;
-  //height: 80px;
-  //line-height: 80px;
-  //background: #E0E0E0;
-  //border-radius: 5px;
-  //background-color: #1B68FD;
-  left: 50%;
-  transform: translateX(-50%);
 }
 
-.main {
-  //padding: 0 15px;
+::v-deep .main-area {
   border-radius: 10px;
   margin: 10px;
   background: #ffffff;
   overflow: auto;
-  //overflow: hidden;
-  //height: 666px;
-  height:calc(100vh - 150px);
-  //overflow: auto;
-  //position: relative;
-  //min-height: 100vh;
-  //padding-bottom: 95px;
-  //box-sizing: border-box;
+  flex: 1;
+}
+
+.submit-btn {
+  margin: 0 0 10px 50%;
+  font-size: 16px;
+  width: 80%;
+  transform: translateX(-50%);
 }
 </style>

+ 2 - 1
src/views/testPlan/testPlanClassify.vue

@@ -216,7 +216,8 @@
         font-weight: 500;
     }
     .list-content {
-        width: 100%;
+      width: 100%;
+      height: calc(100vh - 90px);
 
     }
     /*/deep/.van-tabs__nav--card {*/