vue页面启动设置el-table控件相对全屏的高度

2020-08-05  本文已影响0人  wsj_2012
<template>
...
  <el-table :height="tableHeight"></el-table>
...
</template>

<script>
...
  mounted() {
    this.$nextTick(() => {
      let h =
        window.innerHeight ||
        document.documentElement.clientHeight ||
        document.body.clientHeight;
      this.tableHeight = h - 380;
    });
  },
...
</script>

上一篇 下一篇

猜你喜欢

热点阅读