【记录】element Plus table设置了height=100%时,当数据为空时,table高会出现无限变大的情况

例如:

当table设置了height100%,而tableData又是空的时候,会出现height无限自动增大。

正常情况是height会固定不变了,

只有tableData为空时才会出现

html 复制代码
<div style="height:100%">
	<el-table :data="tableData" height="100%"></el-table>
</div>

解决:

造成此问题的原因,应该是table高100%没有绝对定义相对那个元素的高

html 复制代码
<div style="height:100%;position:relative">
	<el-table :data="tableData" height="100%" style="position: absolute;"></el-table>
</div>
相关推荐
小毛驴8502 分钟前
mvn help:effective-settings 与 mvn help:effective-pom
java·linux·前端
志尊宝9 分钟前
AI原生前端开发(001):Cursor编辑器深度使用从入门到精通
前端·编辑器·ai-native
ZoeLandia17 分钟前
TypeScript 07:工程化——import type、声明文件与 tsconfig
开发语言·前端·typescript
拖孩19 分钟前
# AI 帮我写的小程序,上线不到一个月流量主突然爆了
前端·后端·微信小程序
一木 之林37 分钟前
LangChain 第6章 Agent 智能体核心:create_agent 统一入口与 ReAct 循环
前端·react.js·langchain
不可能片场1 小时前
Electron 发布进程被回收 用脱离进程组托住
前端·electron
kaixin_learn_qt_ing1 小时前
hexdump -C /path/to/binary | less 看十六进制内容
前端·css·less
java1234_小锋1 小时前
【技术专题】HTML5 网页技术 - HTML5 链接与图片
前端·html·html5
sun_weitao1 小时前
Chrome 扩展插件开发指南
前端·javascript·chrome
小马不起床1 小时前
零基础玩转 FastAPI_12:前端详情增强与角色权限分配
前端·状态模式·fastapi