Prechádzať zdrojové kódy

仓储业务-巡检页面

lichao 4 rokov pred
rodič
commit
c226090925

+ 4 - 2
src/views/warehouseBusiness/warehouseCheck/index.vue

@@ -530,8 +530,6 @@ export default {
   },
   mounted() {
     this.$nextTick(() => {
-      // 根据浏览器高度设置初始高度
-      this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
       // 监听浏览器高度变化,改变表格高度
       window.onresize = () => {
         this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
@@ -682,6 +680,10 @@ export default {
           this.logList = res.rows
           this.loading = false
           this.total = res.total
+          // 根据浏览器高度设置初始高度
+          setInterval(() => {
+            this.tableHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 70
+          }, 300)
         }
       })
     },