<template>
    <el-scrollbar
        wrapClass="scrollbar-wrap"
        :style="{height: scrollHeight}"
        ref="scrollbarContainer">
        <div>........</div>
    </el-scrollbar>
</template>        

<script>
    data () {
        return {
            scrollHeight:'0px'
        }
    }
    mounted(){
        this.scrollHeight = window.innerHeight*0.7 + 'px';
    }

</script>

<style>

    .el-scrollbar{
      height: 90%;
      .scrollbar-wrap{
        overflow-x: hidden;
      }
      .el-scrollbar__bar{
        
      }
    }
</style>

 

Logo

前往低代码交流专区

更多推荐