瀏覽代碼

会员端商品列表固定表头

kevin_zhangl 3 年之前
父節點
當前提交
7098b8cfb1
共有 2 個文件被更改,包括 3 次插入2 次删除
  1. 1 1
      frontendEle/src/utils/tool.js
  2. 2 1
      frontendEle/src/views/shop/index.vue

+ 1 - 1
frontendEle/src/utils/tool.js

@@ -208,7 +208,7 @@ let tool = {
      */
     getTableHeight(hasStatusBar = false) {
         if (hasStatusBar) return window.innerHeight - 320
-        return window.innerHeight - 260
+        return window.innerHeight - 300
     },
   // 计算商品税额
   calculateTax(amount, taxRate, count = 1) {

+ 2 - 1
frontendEle/src/views/shop/index.vue

@@ -3,7 +3,7 @@
         <div class="white-box">
             <el-tabs v-model="goodsCategory" @tab-click="handleClick">
                 <el-tab-pane v-for="(item, key) in goodsActive" :key="key" :label="item.label" :name="item.name">
-                    <el-table v-if="numList.length > 0" class="withdraw-table" :data="tableData" stripe style="width: 100%;" ref="multipleTable" @selection-change="handleSelectionChange">
+                    <el-table v-if="numList.length > 0" :max-height="maxHeight" class="withdraw-table" :data="tableData" stripe style="width: 100%;" ref="multipleTable" @selection-change="handleSelectionChange">
                       <el-table-column
                           type="selection"
                           width="55">
@@ -101,6 +101,7 @@
                 selectLock:false,
                 goodsCategory: '1',
                 goodsActive: [],
+                maxHeight: tool.getTableHeight(),
             }
         },
         watch: {