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

提交按钮固定在底部

chenrui преди 3 години
родител
ревизия
74facc9998
променени са 2 файла, в които са добавени 31 реда и са изтрити 14 реда
  1. 8 2
      src/layouts/PageView.vue
  2. 23 12
      src/views/salesManagement/salesQuery/edit.vue

+ 8 - 2
src/layouts/PageView.vue

@@ -38,7 +38,7 @@
         </div>
       </div>
     </page-header>
-    <div class="content">
+    <div class="content" :style="{ height: contHeight+'px' }">
       <div class="page-header-index-wide">
         <slot>
           <!-- keep-alive  -->
@@ -92,7 +92,10 @@ export default {
   computed: {
     ...mapState({
       multiTab: state => state.app.multiTab
-    })
+    }),
+    contHeight () {
+      return window.innerHeight - 80
+    }
   },
   mounted () {
     this.tabs = this.directTabs
@@ -126,6 +129,9 @@ export default {
 <style lang="less" scoped>
   .content {
     margin: 12px 12px 0;
+    .page-header-index-wide{
+      height: 100%;
+    }
     .link {
       margin-top: 16px;
       &:not(:empty) {

+ 23 - 12
src/views/salesManagement/salesQuery/edit.vue

@@ -139,19 +139,20 @@
           </template>
         </s-table>
       </a-card>
-      <a-affix :offset-bottom="0">
-        <div
-          style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-          <a-button
-            size="large"
-            style="width: 150px;"
-            type="primary"
-            class="button-primary"
-            @click="handleSubmit()"
-            id="productInfoList-handleSubmit">提交</a-button>
-        </div>
-      </a-affix>
     </a-spin>
+    <!-- <a-affix :offset-bottom="0"> -->
+    <div
+      class="affix-cont"
+      style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
+      <a-button
+        size="large"
+        style="width: 150px;"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit()"
+        id="productInfoList-handleSubmit">提交</a-button>
+    </div>
+    <!-- </a-affix> -->
     <!-- 选择客户弹框 -->
     <choose-custom-modal ref="custModal" :show="openModal" @updateData="updateData" @cancel="openModal=false" />
     <!-- 打印 -->
@@ -491,6 +492,10 @@ export default {
 
 <style lang="less">
   .salesEdit-wrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 64px;
+    box-sizing: border-box;
     .salesEdit-cont{
       margin-top: 10px;
     }
@@ -512,6 +517,12 @@ export default {
     .redBg-row{
       background-color: #f5cdc8;
     }
+    .affix-cont{
+      position: absolute;
+      bottom: 0;
+      left: 0;
+      width: 100%;
+    }
   }
 
 </style>