隐藏滚动条通常可以通过CSS的overflow属性来实现。将overflow-y属性设置为hidden可以隐藏竖向滚动条。 2. 在el-table组件中应用该方法 由于el-table的滚动条是由内部的.el-table__body-wrapper元素控制的,你需要针对这个元素应用CSS样式。 你可以通过以下两种方式之一来应用样式: 全局样式:在你的全局CSS文
基于Element-UI的Table 组件开发的虚拟滚动组件,支持动态高度,解决数据量大时滚动卡顿的问题 实例代码 <template> <div ref="listWrap" style="height: 400px; overflow-y: scroll; margin-top: 20px; padding: 10px" @scroll="scrollListener" > <div ref="list"> <el-table @select="select" @select-...
::v-deep { .el-table__body-wrapper { overflow-y: auto; height: calc(100vh - 365px); // 表格固定了高度 } .el-table__fixed-body-wrapper { overflow-y: auto; // fixed的列也要超出滚动 height: calc(100vh - 375px); // 出现滚动条需要比表格短10px } } 经过设置后浮动的滚动条和列...
<divstyle="height:90%;overflow-y:scroll"><el-table:data="tableData"style="width: 100%;"row-key="id"border:default-expand-all="false":header-cell-style="{height: '60px'}":tree-props="{children: 'children', hasChildren: 'hasChildren'}"><!-- <el-table-column type="index" align=...
@@ -231,6 +231,7 @@ 231231 } 232232 .el-table{ 233233 height:100%; 234+ overflow-y:auto; 234235 } 235236 .el-table__bodytd,.el-table__bodyth{ 236237 height:50px; 0commit comments Comments 0(0) Pleasesign into comment.
display:block; height:400px; overflow-y:scroll; } tablethead, tbodytr, tfoottr{ display:table; width:100%; height:40px; table-layout:fixed; font-size:16px; text-align:center; } tablethead{ width:calc(100%-1em) } 1. 2. 3. ...
el-table fixed超过高度后不显示Vue.js 的 Element UI 框架中的 el-table 组件提供了 fixed 属性用于固定表头或列。如果设置了 fixed 属性,但在某些情况下表格内容超过了容器的高度而不显示,有一些可能的原因和解决方法:高度设置:确保容器的高度设置得足够大,以容纳整个表格内容,特别是在固定表头或列的情况下...
在容器中设置 flex-grow:2; overflow-y:auto;overflow-x:hidden;容器高度自适应. 内容高度不固定,无法出现滚动条,然后在容器中添加height:0,出现滚动条,个人猜想为设置height:0后,将默认的盒子模型高度设置为空,让flex设置的高度生效: //TODO 实验,查资料IVIEW...
当且仅当页面完全能容下表格,使设置min-width的列宽度比min-width预设值大的时候,隐藏表格在进行显示的时候,设置min-width会收缩一下。如果表格中数据很少,没有触发y轴滚动,就不会出现收缩,如果触发滚动,就会收缩排查出来原因:切换的时候,表格刚出来没有给y轴滚动条分配空间,之后不知道内部怎么操作,然后又给了y...
-- 操作列配置 --> <el-table-column v-if="isOperation && column.length > 0" class-name="class-name" :fixed="fixed" :label="$t('操作')" :showOverflowTooltip="false" :resizable="false" :width="operationWidth" > <slot name="operation" slot-scope="scope" :value="scope"></slot> ...