Ver Fonte

表格高度适应

@dongkboy há 1 ano atrás
pai
commit
cc94764a12
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      src/views/Core/KtCommonTable.vue

+ 3 - 2
src/views/Core/KtCommonTable.vue

@@ -1306,12 +1306,13 @@ export default {
     }
     }
     setTimeout(() => {
     setTimeout(() => {
       let tableTop = that.$refs.commonTable.offsetTop;
       let tableTop = that.$refs.commonTable.offsetTop;
-      let bottomTop = that.$refs.bottomFixed.offsetTop;
-      that.tableHeight = bottomTop - tableTop - 120 + "px";
+      let height = window.innerHeight;
+      that.tableHeight = height - tableTop - 160 + "px";
     }, 10);
     }, 10);
     // window.onresize = function () {
     // window.onresize = function () {
     //   let tableTop = that.$refs.commonTable.offsetTop;
     //   let tableTop = that.$refs.commonTable.offsetTop;
     //   let bottomTop = that.$refs.bottomFixed.offsetTop;
     //   let bottomTop = that.$refs.bottomFixed.offsetTop;
+
     //   that.tableHeight = bottomTop - tableTop - 120 + "px";
     //   that.tableHeight = bottomTop - tableTop - 120 + "px";
     // };
     // };
   },
   },